comparison src/protocols/simple/simple.c @ 12770:ab00cea25ef2

[gaim-migrate @ 15117] I think this is what was actually intended in get_my_ip(). Likewise with simple_udp_process(), although I don't think it'd be possible to use that extra byte anyway. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 09 Jan 2006 03:36:45 +0000
parents a90255f67652
children 8e3b85fe4a55
comparison
equal deleted inserted replaced
12769:a90255f67652 12770:ab00cea25ef2
66 const char *tmp = gaim_network_get_public_ip(); 66 const char *tmp = gaim_network_get_public_ip();
67 67
68 if(!tmp || !strcmp(tmp,"0.0.0.0")) { 68 if(!tmp || !strcmp(tmp,"0.0.0.0")) {
69 tmp = gaim_network_get_my_ip(-1); 69 tmp = gaim_network_get_my_ip(-1);
70 } 70 }
71 if(!tmp) strcpy(my_ip, "0.0.0.0"); 71 strcpy(my_ip, tmp ? tmp : "0.0.0.0");
72 strcpy(my_ip, tmp);
73 return my_ip; 72 return my_ip;
74 } 73 }
75 74
76 static const char *simple_list_icon(GaimAccount *a, GaimBuddy *b) { 75 static const char *simple_list_icon(GaimAccount *a, GaimBuddy *b) {
77 return "simple"; 76 return "simple";
1111 struct sipmsg *msg; 1110 struct sipmsg *msg;
1112 int len; 1111 int len;
1113 time_t currtime; 1112 time_t currtime;
1114 1113
1115 static char buffer[65536]; 1114 static char buffer[65536];
1116 if((len = recv(source, buffer, 65536, 0)) > 0) { 1115 if((len = recv(source, buffer, sizeof(buffer) - 1, 0)) > 0) {
1117 buffer[len] = '\0'; 1116 buffer[len] = '\0';
1118 gaim_debug_info("simple","\n\nreceived - %s\n######\n%s\n#######\n\n",ctime(&currtime), buffer); 1117 gaim_debug_info("simple","\n\nreceived - %s\n######\n%s\n#######\n\n",ctime(&currtime), buffer);
1119 msg = sipmsg_parse_msg(buffer); 1118 msg = sipmsg_parse_msg(buffer);
1120 if(msg) process_input_message(sip, msg); 1119 if(msg) process_input_message(sip, msg);
1121 } 1120 }