| 214 xmlnode_free(message_node); |
216 xmlnode_free(message_node); |
| 215 g_free(body); |
217 g_free(body); |
| 216 g_free(html_body); |
218 g_free(html_body); |
| 217 } |
219 } |
| 218 |
220 |
| 219 gboolean |
221 static gboolean |
| 220 _check_buddy_by_address(gpointer key, gpointer value, gpointer address) |
222 _check_buddy_by_address(gpointer key, gpointer value, gpointer address) |
| 221 { |
223 { |
| 222 GaimBuddy *gb = (GaimBuddy*)value; |
224 GaimBuddy *gb = (GaimBuddy*)value; |
| 223 BonjourBuddy *bb = (BonjourBuddy*)gb->proto_data; |
225 BonjourBuddy *bb = (BonjourBuddy*)gb->proto_data; |
| 224 |
226 |
| 263 gaim_debug_info("bonjour", "Receive: -%s- %d bytes\n", *message, total_message_length); |
265 gaim_debug_info("bonjour", "Receive: -%s- %d bytes\n", *message, total_message_length); |
| 264 |
266 |
| 265 return total_message_length; |
267 return total_message_length; |
| 266 } |
268 } |
| 267 |
269 |
| 268 gint |
270 static gint |
| 269 _send_data(gint socket, char *message) |
271 _send_data(gint socket, char *message) |
| 270 { |
272 { |
| 271 gint message_len = strlen(message); |
273 gint message_len = strlen(message); |
| 272 gint parcial_sent = 0; |
274 gint parcial_sent = 0; |
| 273 gchar *parcial_message = message; |
275 gchar *parcial_message = message; |
| 283 } |
285 } |
| 284 |
286 |
| 285 return strlen(message); |
287 return strlen(message); |
| 286 } |
288 } |
| 287 |
289 |
| 288 void |
290 static void |
| 289 _client_socket_handler(gpointer data, gint socket, GaimInputCondition condition) |
291 _client_socket_handler(gpointer data, gint socket, GaimInputCondition condition) |
| 290 { |
292 { |
| 291 char *message = NULL; |
293 char *message = NULL; |
| 292 gint message_length; |
294 gint message_length; |
| 293 GaimBuddy *gb = (GaimBuddy*)data; |
295 GaimBuddy *gb = (GaimBuddy*)data; |
| 358 /* Parse the message to get the data and send to the ui */ |
360 /* Parse the message to get the data and send to the ui */ |
| 359 _jabber_parse_and_write_message_to_ui(message, account->gc, gb); |
361 _jabber_parse_and_write_message_to_ui(message, account->gc, gb); |
| 360 } |
362 } |
| 361 } |
363 } |
| 362 |
364 |
| 363 void |
365 static void |
| 364 _server_socket_handler(gpointer data, int server_socket, GaimInputCondition condition) |
366 _server_socket_handler(gpointer data, int server_socket, GaimInputCondition condition) |
| 365 { |
367 { |
| 366 GaimBuddy *gb = NULL; |
368 GaimBuddy *gb = NULL; |
| 367 struct sockaddr_in their_addr; /* connector's address information */ |
369 struct sockaddr_in their_addr; /* connector's address information */ |
| 368 socklen_t sin_size = sizeof(struct sockaddr); |
370 socklen_t sin_size = sizeof(struct sockaddr); |