Mercurial > pidgin.yaz
comparison src/protocols/bonjour/jabber.c @ 11498:ea52fefd3602
[gaim-migrate @ 13743]
Some more fixes. Or maybe just warning fixes. It compiles now.
Probably doesn't work correctly.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 10 Sep 2005 21:10:39 +0000 |
parents | 36f575351c49 |
children | f8a447af7494 |
comparison
equal
deleted
inserted
replaced
11497:8d0a2b6c192b | 11498:ea52fefd3602 |
---|---|
125 xmlnode* body_node = NULL; | 125 xmlnode* body_node = NULL; |
126 char* body = NULL; | 126 char* body = NULL; |
127 xmlnode* html_node = NULL; | 127 xmlnode* html_node = NULL; |
128 gboolean isHTML = FALSE; | 128 gboolean isHTML = FALSE; |
129 xmlnode* html_body_node = NULL; | 129 xmlnode* html_body_node = NULL; |
130 char* ichat_balloon_color = NULL; | 130 const char* ichat_balloon_color = NULL; |
131 char* ichat_text_color = NULL; | 131 const char* ichat_text_color = NULL; |
132 xmlnode* html_body_font_node = NULL; | 132 xmlnode* html_body_font_node = NULL; |
133 char* font_face = NULL; | 133 const char* font_face = NULL; |
134 char* font_size = NULL; | 134 const char* font_size = NULL; |
135 char* font_color = NULL; | 135 const char* font_color = NULL; |
136 char* html_body = NULL; | 136 char* html_body = NULL; |
137 xmlnode* events_node = NULL; | 137 xmlnode* events_node = NULL; |
138 gboolean composing_event = FALSE; | 138 gboolean composing_event = FALSE; |
139 gint garbage = -1; | 139 gint garbage = -1; |
140 xmlnode* message_node = NULL; | 140 xmlnode* message_node = NULL; |
281 GaimAccount* account = gb->account; | 281 GaimAccount* account = gb->account; |
282 GaimConversation* conversation; | 282 GaimConversation* conversation; |
283 char* closed_conv_message; | 283 char* closed_conv_message; |
284 BonjourBuddy* bb = (BonjourBuddy*)gb->proto_data; | 284 BonjourBuddy* bb = (BonjourBuddy*)gb->proto_data; |
285 gboolean closed_conversation = FALSE; | 285 gboolean closed_conversation = FALSE; |
286 char* error_message; | |
287 | 286 |
288 // Read the data from the socket | 287 // Read the data from the socket |
289 if ((message_length = _read_data(socket, &message)) == -1) { | 288 if ((message_length = _read_data(socket, &message)) == -1) { |
290 // There have been an error reading from the socket | 289 // There have been an error reading from the socket |
291 return; | 290 return; |
334 g_free(bb->conversation); | 333 g_free(bb->conversation); |
335 bb->conversation = NULL; | 334 bb->conversation = NULL; |
336 } | 335 } |
337 | 336 |
338 // Inform the user that the conversation has been closed | 337 // Inform the user that the conversation has been closed |
339 conversation = gaim_find_conversation_with_account(gb->name, account); | 338 conversation = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, gb->name, account); |
340 closed_conv_message = g_strconcat(gb->name, " has closed the conversation.", NULL); | 339 closed_conv_message = g_strconcat(gb->name, " has closed the conversation.", NULL); |
341 gaim_conversation_write(conversation, NULL, closed_conv_message, GAIM_MESSAGE_SYSTEM, time(NULL)); | 340 gaim_conversation_write(conversation, NULL, closed_conv_message, GAIM_MESSAGE_SYSTEM, time(NULL)); |
342 } else { | 341 } else { |
343 // Parse the message to get the data and send to the ui | 342 // Parse the message to get the data and send to the ui |
344 _jabber_parse_and_write_message_to_ui(message, account->gc, gb); | 343 _jabber_parse_and_write_message_to_ui(message, account->gc, gb); |
518 // Start the stream | 517 // Start the stream |
519 if (send(bb->conversation->socket, DOCTYPE, strlen(DOCTYPE), 0) == -1) { | 518 if (send(bb->conversation->socket, DOCTYPE, strlen(DOCTYPE), 0) == -1) { |
520 gaim_debug_error("bonjour", "Unable to start a conversation\n"); | 519 gaim_debug_error("bonjour", "Unable to start a conversation\n"); |
521 perror("send"); | 520 perror("send"); |
522 conv_message = g_strdup("Unable to send the message, the conversation couldn't be started."); | 521 conv_message = g_strdup("Unable to send the message, the conversation couldn't be started."); |
523 conversation = gaim_find_conversation_with_account(bb->name, data->account); | 522 conversation = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, bb->name, data->account); |
524 gaim_conversation_write(conversation, NULL, conv_message, GAIM_MESSAGE_SYSTEM, time(NULL)); | 523 gaim_conversation_write(conversation, NULL, conv_message, GAIM_MESSAGE_SYSTEM, time(NULL)); |
525 close(bb->conversation->socket); | 524 close(bb->conversation->socket); |
526 gaim_input_remove(bb->conversation->watcher_id); | 525 gaim_input_remove(bb->conversation->watcher_id); |
527 | 526 |
528 // Free all the data related to the conversation | 527 // Free all the data related to the conversation |
537 | 536 |
538 // Send the message | 537 // Send the message |
539 if (_send_data(bb->conversation->socket, message) == -1) { | 538 if (_send_data(bb->conversation->socket, message) == -1) { |
540 gaim_debug_error("bonjour", "Unable to send the message\n"); | 539 gaim_debug_error("bonjour", "Unable to send the message\n"); |
541 conv_message = g_strdup("Unable to send the message."); | 540 conv_message = g_strdup("Unable to send the message."); |
542 conversation = gaim_find_conversation_with_account(bb->name, data->account); | 541 conversation = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, bb->name, data->account); |
543 gaim_conversation_write(conversation, NULL, conv_message, GAIM_MESSAGE_SYSTEM, time(NULL)); | 542 gaim_conversation_write(conversation, NULL, conv_message, GAIM_MESSAGE_SYSTEM, time(NULL)); |
544 } | 543 } |
545 } | 544 } |
546 | 545 |
547 void bonjour_jabber_close_conversation(BonjourJabber* data, GaimBuddy* gb) | 546 void bonjour_jabber_close_conversation(BonjourJabber* data, GaimBuddy* gb) |