pidgin: 09d396a2: Clean up some stuff that the behavior ha...
datallah at pidgin.im
datallah at pidgin.im
Tue Dec 9 21:25:45 EST 2008
-----------------------------------------------------------------
Revision: 09d396a2cb091531ea1165fa5189ed61f3f63033
Ancestor: f29595959d0a02d8035ad35f9569cc11b6ec9ed1
Author: datallah at pidgin.im
Date: 2008-12-10T02:23:27
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/09d396a2cb091531ea1165fa5189ed61f3f63033
Modified files:
libpurple/protocols/bonjour/jabber.c
libpurple/protocols/bonjour/jabber.h
ChangeLog:
Clean up some stuff that the behavior has changed on to fix CID 398.
-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/jabber.c 11233ea49ef6419e39bb1dd414b237b556f52d49
+++ libpurple/protocols/bonjour/jabber.c 8f7390bdb185578c57a33a612e4dd23ef8d54c4e
@@ -369,7 +369,32 @@ void bonjour_jabber_process_packet(Purpl
purple_debug_warning("bonjour", "Unknown packet: %s\n", packet->name ? packet->name : "(null)");
}
+static void bonjour_jabber_stream_ended(BonjourJabberConversation *bconv) {
+ /* Inform the user that the conversation has been closed */
+ BonjourBuddy *bb = NULL;
+
+ purple_debug_info("bonjour", "Recieved conversation close notification from %s.\n", bconv->pb ? bconv->pb->name : "(unknown)");
+
+ if(bconv->pb != NULL)
+ bb = bconv->pb->proto_data;
+#if 0
+ if(bconv->pb != NULL) {
+ PurpleConversation *conv;
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, bconv->pb->name, bconv->pb->account);
+ if (conv != NULL) {
+ char *tmp = g_strdup_printf(_("%s has closed the conversation."), bconv->pb->name);
+ purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL));
+ g_free(tmp);
+ }
+ }
+#endif
+ /* Close the socket, clear the watcher and free memory */
+ bonjour_jabber_close_conversation(bconv);
+ if(bb)
+ bb->conversation = NULL;
+}
+
static void
_client_socket_handler(gpointer data, gint socket, PurpleInputCondition condition)
{
@@ -414,35 +439,6 @@ _client_socket_handler(gpointer data, gi
bonjour_parser_process(bconv, message, message_length);
}
-void bonjour_jabber_stream_ended(BonjourJabberConversation *bconv) {
-
- purple_debug_info("bonjour", "Recieved conversation close notification from %s.\n", bconv->pb ? bconv->pb->name : "(unknown)");
-
- /* Inform the user that the conversation has been closed */
- if (bconv != NULL) {
- BonjourBuddy *bb = NULL;
-
- if(bconv->pb != NULL)
- bb = bconv->pb->proto_data;
-#if 0
- if(bconv->pb != NULL) {
- PurpleConversation *conv;
- conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, bconv->pb->name, bconv->pb->account);
- if (conv != NULL) {
- char *tmp = g_strdup_printf(_("%s has closed the conversation."), bconv->pb->name);
- purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL));
- g_free(tmp);
- }
- }
-#endif
- /* Close the socket, clear the watcher and free memory */
- bonjour_jabber_close_conversation(bconv);
- if(bb)
- bb->conversation = NULL;
- }
-}
-
-
struct _stream_start_data {
char *msg;
};
============================================================
--- libpurple/protocols/bonjour/jabber.h 8ba8d69486cd048a1fe4f34b0c6596b7c2ff768c
+++ libpurple/protocols/bonjour/jabber.h fd0d9608d8b1594febf8281baa27b4521ee2cedf
@@ -79,8 +79,6 @@ void bonjour_jabber_stream_started(Bonjo
void bonjour_jabber_stream_started(BonjourJabberConversation *bconv);
-void bonjour_jabber_stream_ended(BonjourJabberConversation *bconv);
-
void bonjour_jabber_process_packet(PurpleBuddy *pb, xmlnode *packet);
void bonjour_jabber_stop(BonjourJabber *data);
More information about the Commits
mailing list