comparison libpurple/protocols/zephyr/zephyr.c @ 23201:313b87adb730

A patch from Peter O'Gorman at The Written Word, Inc. to fix various portability issues. These changes seemed reasonable, even though I wasn't able to test or verify them all in particular. Hopefully we don't break anything on another OS. Refs #3798 committer: Richard Laager <rlaager@wiktel.com>
author Peter O'Gorman <pogma@thewrittenword.com>
date Tue, 27 May 2008 01:11:46 +0000
parents 047c56435f1e
children ff29208e03ef 18550104ad58 16734635febf
comparison
equal deleted inserted replaced
23200:5197256f66b5 23201:313b87adb730
890 } 890 }
891 891
892 gconv1 = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, 892 gconv1 = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT,
893 zt2->name, gc->account); 893 zt2->name, gc->account);
894 gcc = purple_conversation_get_chat_data(gconv1); 894 gcc = purple_conversation_get_chat_data(gconv1);
895 895 #ifndef INET_ADDRSTRLEN
896 #define INET_ADDRSTRLEN 16
897 #endif
896 if (!purple_conv_chat_find_user(gcc, sendertmp)) { 898 if (!purple_conv_chat_find_user(gcc, sendertmp)) {
897 gchar ipaddr[INET_ADDRSTRLEN]; 899 gchar ipaddr[INET_ADDRSTRLEN];
900 #ifdef HAVE_INET_NTOP
898 inet_ntop(AF_INET, &notice.z_sender_addr.s_addr, ipaddr, sizeof(ipaddr)); 901 inet_ntop(AF_INET, &notice.z_sender_addr.s_addr, ipaddr, sizeof(ipaddr));
899 902 #else
903 memcpy(ipaddr,inet_ntoa(notice.z_sender_addr),sizeof(ipaddr));
904 #endif
900 purple_conv_chat_add_user(gcc, sendertmp, ipaddr, PURPLE_CBFLAGS_NONE, TRUE); 905 purple_conv_chat_add_user(gcc, sendertmp, ipaddr, PURPLE_CBFLAGS_NONE, TRUE);
901 } 906 }
902 g_free(sendertmp); 907 g_free(sendertmp);
903 serv_got_chat_in(gc, zt2->id, send_inst_utf8, 0, buf3, time(NULL)); 908 serv_got_chat_in(gc, zt2->id, send_inst_utf8, 0, buf3, time(NULL));
904 g_free(send_inst); 909 g_free(send_inst);