comparison libpurple/protocols/zephyr/zephyr.c @ 24544:737bf6236bd3

Compile
author Richard Laager <rlaager@wiktel.com>
date Wed, 26 Nov 2008 22:13:55 +0000
parents a6a6a6c19058
children 8050ea54a83e
comparison
equal deleted inserted replaced
24543:a6a6a6c19058 24544:737bf6236bd3
346 static gchar *zephyr_recv_convert(PurpleConnection *gc, gchar *string) 346 static gchar *zephyr_recv_convert(PurpleConnection *gc, gchar *string)
347 { 347 {
348 gchar *utf8; 348 gchar *utf8;
349 GError *err = NULL; 349 GError *err = NULL;
350 zephyr_account *zephyr = gc->proto_data; 350 zephyr_account *zephyr = gc->proto_data;
351 if (g_utf8_validate(string, len, NULL)) { 351 if (g_utf8_validate(string, -1, NULL)) {
352 return g_strdup(string); 352 return g_strdup(string);
353 } else { 353 } else {
354 utf8 = g_convert(string, -1, "UTF-8", zephyr->encoding, NULL, NULL, &err); 354 utf8 = g_convert(string, -1, "UTF-8", zephyr->encoding, NULL, NULL, &err);
355 if (err) { 355 if (err) {
356 purple_debug_error("zephyr", "recv conversion error: %s\n", err->message); 356 purple_debug_error("zephyr", "recv conversion error: %s\n", err->message);
894 zt2->name, gc->account); 894 zt2->name, gc->account);
895 gcc = purple_conversation_get_chat_data(gconv1); 895 gcc = purple_conversation_get_chat_data(gconv1);
896 #ifndef INET_ADDRSTRLEN 896 #ifndef INET_ADDRSTRLEN
897 #define INET_ADDRSTRLEN 16 897 #define INET_ADDRSTRLEN 16
898 #endif 898 #endif
899 if (!purple_conv_chat_find_user(gcc, sendertmp)) { 899 if (!purple_conv_chat_find_user(gcc, stripped_sender)) {
900 gchar ipaddr[INET_ADDRSTRLEN]; 900 gchar ipaddr[INET_ADDRSTRLEN];
901 #ifdef HAVE_INET_NTOP 901 #ifdef HAVE_INET_NTOP
902 inet_ntop(AF_INET, &notice.z_sender_addr.s_addr, ipaddr, sizeof(ipaddr)); 902 inet_ntop(AF_INET, &notice.z_sender_addr.s_addr, ipaddr, sizeof(ipaddr));
903 #else 903 #else
904 memcpy(ipaddr,inet_ntoa(notice.z_sender_addr),sizeof(ipaddr)); 904 memcpy(ipaddr,inet_ntoa(notice.z_sender_addr),sizeof(ipaddr));