ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/src chat_room.c,1.41,1.42 llist.c,1.7,1.8 ser


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src chat_room.c,1.41,1.42 llist.c,1.7,1.8 service.c,1.11,1.12 util.c,1.29,1.30
Date: Tue, 28 Jan 2003 05:35:37 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv19349/src

Modified Files:
        chat_room.c llist.c service.c util.c 
Log Message:
- src/chat_room.c
fix chat_rooms-related segfaults in util.c
- modules/workwizu/workwizu.c
paranoid inits



Index: chat_room.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_room.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- chat_room.c 28 Jan 2003 08:08:55 -0000      1.41
+++ chat_room.c 28 Jan 2003 10:35:35 -0000      1.42
@@ -497,8 +497,10 @@
 static void destroy(GtkWidget * widget, gpointer data)
 {
        eb_chat_room * ecr = data;
+       while (l_list_find(chat_rooms, data)) {
+               chat_rooms = l_list_remove(chat_rooms, data);
+       }
        RUN_SERVICE(ecr->chat_room_account)->leave_chat_room(ecr);
-       chat_rooms = l_list_remove(chat_rooms, data);
        g_free(ecr);
 }
 
@@ -611,7 +613,9 @@
        if( ecb )
        {
                ecb->service_id = service;
-               chat_rooms = l_list_append(chat_rooms, ecb);
+               if (!l_list_find(chat_rooms,ecb)) {
+                       chat_rooms = l_list_append(chat_rooms, ecb);
+               }
                eb_chat_room_update_window_title(ecb, FALSE);
        }
 }
@@ -761,9 +765,10 @@
        if(chat_room->connected)
                return;
        
-       if (!l_list_find(chat_rooms, chat_room))
+       if (!l_list_find(chat_rooms, chat_room)) {
                chat_rooms = l_list_append(chat_rooms, chat_room);
-       
+       }
+               
        /*otherwise we are going to make ourselves a gui right here*/
 
        vbox = gtk_vbox_new(FALSE, 1);

Index: llist.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/llist.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- llist.c     27 Jan 2003 13:48:19 -0000      1.7
+++ llist.c     28 Jan 2003 10:35:35 -0000      1.8
@@ -108,9 +108,7 @@
 
        if (link == list)
                list = link->next;
-
-/*  link->prev = link->next = NULL; */
-
+       
        return list;
 }
 

Index: service.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/service.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- service.c   26 Jan 2003 11:44:45 -0000      1.11
+++ service.c   28 Jan 2003 10:35:35 -0000      1.12
@@ -77,9 +77,10 @@
                /* Check to see if another service exists for the same 
protocol, if so, replace it */
                if (!strcasecmp(eb_services[i].name,Service_Info->name))
                {
-                               eb_debug(DBG_CORE, "Replacing %s service\n", 
Service_Info->name);
+                               eb_debug(DBG_CORE, "Replacing %s service ", 
Service_Info->name);
                                free(eb_services[i].sc);
                                Service_Info->protocol_id=i;
+                               eb_debug(DBG_CORE, "(service_id 
%d)\n",Service_Info->protocol_id);
                                memcpy(&eb_services[i], Service_Info, 
sizeof(struct service));
                                refresh_service_contacts(i);
                                reload_service_accounts(i);
@@ -89,6 +90,7 @@
                
        }
        Service_Info->protocol_id=NUM_SERVICES++;
+       eb_debug(DBG_CORE, "(%s: service_id %d)\n",Service_Info->name, 
Service_Info->protocol_id);
        memcpy(&eb_services[Service_Info->protocol_id], Service_Info, 
sizeof(struct service));
        refresh_service_contacts(i);
        reload_service_accounts(Service_Info->protocol_id);

Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- util.c      27 Jan 2003 17:13:00 -0000      1.29
+++ util.c      28 Jan 2003 10:35:35 -0000      1.30
@@ -596,6 +596,7 @@
 {
        LList * node = NULL;
        LList * result = NULL;
+       
        for (node = chat_rooms; node && node->data; node = node->next) {
                eb_chat_room *ecr = node->data;
                if (ecr && remote->service_id == ecr->service_id) {
@@ -605,7 +606,6 @@
                             others && others->data && !found; 
                             others = others->next) {
                                eb_chat_room_buddy *ecrb = others->data;
-                               printf("others = %p\n",others);
                                if(!strcmp(remote->handle, ecrb->handle)) {
                                        found = TRUE;
                                        result = l_list_append(result, ecr);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]