Hello community, here is the log from the commit of package gaim checked in at Wed Jun 21 23:02:29 CEST 2006. -------- --- GNOME/gaim/gaim.changes 2006-03-20 20:43:32.000000000 +0100 +++ gaim/gaim.changes 2006-06-21 23:01:33.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Jun 21 23:01:07 CEST 2006 - gekker@suse.de + +- Fix deadlock where conversations can no longer be created (#186903) + +------------------------------------------------------------------- New: ---- gaim-186903-conf-not-found.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gaim.spec ++++++ --- /var/tmp/diff_new_pack.pRGkPC/_old 2006-06-21 23:02:20.000000000 +0200 +++ /var/tmp/diff_new_pack.pRGkPC/_new 2006-06-21 23:02:20.000000000 +0200 @@ -14,7 +14,7 @@ BuildRequires: doxygen evolution-data-server-devel gnome-icon-theme gnome-keyring-devel graphviz gtkspell-devel libao-devel libgnomeprintui-devel libstdc++-devel libwnck-devel mDNSResponder-devel mozilla-nss-devel startup-notification-devel tk-devel update-desktop-files Summary: GTK+-Based Multiprotocol Instant Messaging Client Version: 1.5.0 -Release: 41 +Release: 50 License: GPL Group: Productivity/Networking/AOLInstantMessenger Conflicts: gaim-applet @@ -42,6 +42,7 @@ Patch27: gaim-1.5.0-gnome-keyring.patch Patch28: gaim-transparent-trayicon.patch Patch29: gaim-dbus-reconnect-thoenig-01.patch +Patch30: gaim-186903-conf-not-found.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: gconf2 dbus-1-glib gnome-icon-theme %define prefix /opt/gnome @@ -161,6 +162,7 @@ %patch29 %endif %patch28 +%patch30 %build %if %suse_version > 1000 @@ -224,6 +226,8 @@ %prefix/include/gaim %changelog -n gaim +* Wed Jun 21 2006 - gekker@suse.de +- Fix deadlock where conversations can no longer be created (#186903) * Mon Mar 20 2006 - danw@suse.de - If gnome-keyring-manager isn't running, use the traditional gaim password storage. #156939 ++++++ gaim-186903-conf-not-found.patch ++++++ Index: src/protocols/novell/novell.c =================================================================== --- src/protocols/novell/novell.c (revision 16304) +++ src/protocols/novell/novell.c (working copy) @@ -2381,17 +2381,29 @@ return; } + conference = NULL; for (cnode = user->conferences; cnode != NULL; cnode = cnode->next) { - conference = cnode->data; - if (conference && (chat = nm_conference_get_data(conference))) { + NMConference *tmp = cnode->data; + if (tmp && (chat = nm_conference_get_data(tmp))) { if (gaim_conv_chat_get_id(GAIM_CONV_CHAT(chat)) == id) { - rc = nm_send_conference_invite(user, conference, user_record, - message, _sendinvite_resp_cb, NULL); - _check_for_disconnect(user, rc); + conference = tmp; break; } } } + + if (conference == NULL) { + /* Reinstantiate the conference */ + conference = nm_create_conference(NULL); + nm_conference_set_data(conference, (gpointer) gaim_find_chat(gc, id)); + nm_send_create_conference(user, conference, _createconf_resp_send_invite, user_record); + nm_release_conference(conference); + } + else { + rc = nm_send_conference_invite(user, conference, user_record, + message, _sendinvite_resp_cb, NULL); + _check_for_disconnect(user, rc); + } } static int Index: src/protocols/novell/nmconference.c =================================================================== --- src/protocols/novell/nmconference.c (revision 16304) +++ src/protocols/novell/nmconference.c (working copy) @@ -32,6 +32,9 @@ /* The list of participants for the conference */ GSList *participants; + /* The list of invitees for the conference */ + GSList *invitees; + /* Flags for the conference */ guint32 flags; @@ -97,6 +100,19 @@ g_slist_free(conference->participants); } + if (conference->invitees) { + for (node = conference->invitees; node; node = node->next) { + if (node->data) { + NMUserRecord *user_record = node->data; + + nm_release_user_record(user_record); + node->data = NULL; + } + } + + g_slist_free(conference->invitees); + } + g_free(conference); } } @@ -169,7 +185,66 @@ } } +int +nm_conference_get_invitee_count(NMConference * conference) +{ + if (conference == NULL) + return 0; + + return g_slist_length(conference->invitees); +} + +NMUserRecord * +nm_conference_get_invitee(NMConference * conference, int index) +{ + if (conference == NULL) + return NULL; + + return (NMUserRecord *) g_slist_nth_data(conference->invitees, index); +} + void +nm_conference_add_invitee(NMConference * conference, + NMUserRecord * user_record) +{ + if (conference == NULL || user_record == NULL) { + return; + } + + nm_user_record_add_ref(user_record); + conference->invitees = g_slist_append(conference->invitees, user_record); +} + +void +nm_conference_remove_invitee(NMConference * conference, const char *dn) +{ + GSList *node, *element = NULL; + + if (conference == NULL || dn == NULL) { + return; + } + + for (node = conference->invitees; node; node = node->next) { + NMUserRecord *user_record = node->data; + + if (user_record) { + if (nm_utf8_str_equal(dn, nm_user_record_get_dn(user_record))) { + element = node; + break; + } + } + } + + if (element) { + nm_release_user_record((NMUserRecord *) element->data); + element->data = NULL; + conference->invitees = + g_slist_remove_link(conference->invitees, element); + g_slist_free_1(element); + } +} + +void nm_conference_add_ref(NMConference * conference) { if (conference) Index: src/protocols/novell/nmconference.h =================================================================== --- src/protocols/novell/nmconference.h (revision 16304) +++ src/protocols/novell/nmconference.h (working copy) @@ -126,6 +126,46 @@ NMUserRecord *nm_conference_get_participant(NMConference * conference, int index); /** + * Add an invitee to the conference. + * + * @param conference The conference + * @param user_record The user record to add as an invitee + * + * @return + */ +void nm_conference_add_invitee(NMConference * conference, NMUserRecord * user_record); + +/** + * Remove an invitee to the conference. + * + * @param conference The conference + * @param dn The dn of the invitee to remove + * + */ +void nm_conference_remove_invitee(NMConference * conference, const char *dn); + +/** + * Return the total number of invitees in the conference. + * + * @param conference The conference + * + * @return The number of invitees for the conference + * + */ +int nm_conference_get_invitee_count(NMConference * conference); + +/** + * Return an invitee given an index. + * + * @param conference The conference + * @param index The index of the invitee to get + * + * @return The invitee or NULL if the index is out of range. + * + */ +NMUserRecord *nm_conference_get_invitee(NMConference * conference, int index); + +/** * Check to see if the conference has been instantiated * * @param conference The conference Index: src/protocols/novell/nmuser.c =================================================================== --- src/protocols/novell/nmuser.c (revision 16304) +++ src/protocols/novell/nmuser.c (working copy) @@ -430,8 +430,10 @@ /* Send the request to the server */ rc = nm_send_request(user->conn, "sendinvite", fields, callback, data, &req); - if (rc == NM_OK && req) + if (rc == NM_OK && req) { nm_request_set_data(req, conference); + nm_request_set_user_define(req, user_record); + } if (req) nm_release_request(req); @@ -1736,6 +1738,12 @@ } } else if (strcmp("updateblocks", cmd) == 0) { /* nothing to do here */ + } else if (strcmp("sendinvite", cmd) == 0) { + user_record = nm_request_get_user_define(request); + conf = nm_request_get_data(request); + if (user_record && conf) { + nm_conference_add_invitee(conf, user_record); + } } else { /* Nothing to do, just print debug message */ Index: src/protocols/novell/nmevent.c =================================================================== --- src/protocols/novell/nmevent.c (revision 16304) +++ src/protocols/novell/nmevent.c (working copy) @@ -113,7 +113,9 @@ conference = nm_event_get_conference(event); if (conference) { - /* Add source of event as recip of the conference */ + nm_conference_remove_invitee(conference, nm_user_record_get_dn(user_record)); + + /* Add source of event as recip of the conference */ nm_conference_add_participant(conference, user_record); /* Add the user record to the event structure @@ -412,6 +414,17 @@ conference = nm_conference_list_find(user, guid); if (conference) { nm_event_set_conference(event, conference); + + /* Remove invitee */ + nm_conference_remove_invitee(conference, nm_event_get_source(event)); + + /* Remove the conference from the list if there are no more + remaining participants or invitees */ + if ((nm_conference_get_participant_count(conference) == 0) && + (nm_conference_get_invitee_count(conference) == 0)) { + nm_conference_list_remove(user, conference); + } + } else { rc = NMERR_CONFERENCE_NOT_FOUND; } @@ -455,11 +468,16 @@ if (rc == NM_OK) { conference = nm_conference_list_find(user, guid); if (conference) { + nm_event_set_conference(event, conference); nm_conference_set_flags(conference, flags); nm_conference_remove_participant(conference, nm_event_get_source(event)); - if (nm_conference_get_participant_count(conference) == 0) { + + /* Remove the conference from the list if there are no more + remaining participants or invitees */ + if ((nm_conference_get_participant_count(conference) == 0) && + (nm_conference_get_invitee_count(conference) == 0)) { nm_conference_list_remove(user, conference); } @@ -552,6 +570,8 @@ /* Add the new user to the participants list */ user_record = nm_find_user_record(user, nm_event_get_source(event)); if (user_record) { + nm_conference_remove_invitee(conference, + nm_user_record_get_dn(user_record)); nm_conference_remove_participant(conference, nm_user_record_get_dn(user_record)); nm_conference_add_participant(conference, user_record); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org