| 1109 struct simple_account_data *sip = gc->proto_data; |
1109 struct simple_account_data *sip = gc->proto_data; |
| 1110 struct sipmsg *msg; |
1110 struct sipmsg *msg; |
| 1111 int len; |
1111 int len; |
| 1112 time_t currtime; |
1112 time_t currtime; |
| 1113 |
1113 |
| |
1114 /** XXX: eek! What if we can't receive everything right now? |
| |
1115 (need to maintain buffer for next read) */ |
| 1114 static char buffer[65536]; |
1116 static char buffer[65536]; |
| 1115 len = recv(source, buffer, 65536, 0); |
1117 if((len = recv(source, buffer, 65536, 0))) { |
| 1116 buffer[len] = 0; |
1118 buffer[len] = '\0'; |
| 1117 gaim_debug_info("simple","\n\nreceived - %s\n######\n%s\n#######\n\n",ctime(&currtime), buffer); |
1119 gaim_debug_info("simple","\n\nreceived - %s\n######\n%s\n#######\n\n",ctime(&currtime), buffer); |
| 1118 msg = sipmsg_parse_msg(buffer); |
1120 msg = sipmsg_parse_msg(buffer); |
| 1119 if(msg) process_input_message(sip, msg); |
1121 if(msg) process_input_message(sip, msg); |
| |
1122 } |
| 1120 } |
1123 } |
| 1121 |
1124 |
| 1122 static void simple_input_cb(gpointer data, gint source, GaimInputCondition cond) |
1125 static void simple_input_cb(gpointer data, gint source, GaimInputCondition cond) |
| 1123 { |
1126 { |
| 1124 GaimConnection *gc = data; |
1127 GaimConnection *gc = data; |