[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src util.c,1.12,1.13 chat_room.c,1.32,1.33
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src util.c,1.12,1.13 chat_room.c,1.32,1.33 |
Date: |
Thu, 16 Jan 2003 08:49:11 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv25797/src
Modified Files:
util.c chat_room.c
Log Message:
Preventive fix(?) for a strange segfault
Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- util.c 16 Jan 2003 13:11:01 -0000 1.12
+++ util.c 16 Jan 2003 13:49:09 -0000 1.13
@@ -767,14 +767,16 @@
GList * find_chatrooms_with_remote_account(eb_account *remote)
{
- GList * node = chat_rooms;
+ GList * node = NULL;
GList * result = NULL;
for (node = chat_rooms; node && node->data; node = node->next) {
eb_chat_room *ecr = node->data;
- if (remote->service_id == ecr->service_id) {
+ if (ecr && remote->service_id == ecr->service_id) {
GList *others = NULL;
gboolean found = FALSE;
- for (others = ecr->fellows; others && others->data &&
!found; others=others->next) {
+ for (others = ecr->fellows;
+ others && others->data && !found;
+ others = others->next) {
eb_chat_room_buddy *ecrb = others->data;
if(!strcmp(remote->handle, ecrb->handle)) {
found = TRUE;
Index: chat_room.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_room.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- chat_room.c 16 Jan 2003 13:11:01 -0000 1.32
+++ chat_room.c 16 Jan 2003 13:49:09 -0000 1.33
@@ -501,7 +501,7 @@
{
eb_chat_room * ecr = data;
RUN_SERVICE(ecr->chat_room_account)->leave_chat_room(ecr);
- chat_rooms = g_list_remove(chat_rooms, data);
+ chat_rooms = g_list_remove_link(chat_rooms, data);
g_free(ecr);
}
@@ -1082,7 +1082,7 @@
if (!ecr->typing_fellows ||
!g_list_find(ecr->typing_fellows, remote))
ecr->typing_fellows =
g_list_append(ecr->typing_fellows, remote);
} else if (ecr->typing_fellows) {
- ecr->typing_fellows =
g_list_remove(ecr->typing_fellows, remote);
+ ecr->typing_fellows =
g_list_remove_link(ecr->typing_fellows, remote);
}
for (walk2 = ecr->typing_fellows; walk2 && walk2->data; walk2 =
walk2->next) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src util.c,1.12,1.13 chat_room.c,1.32,1.33,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm configure.in,1.128,1.129
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.131,1.132 configure.in,1.129,1.130
- Previous by thread:
[Ayttm-commits] CVS: ayttm configure.in,1.128,1.129
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.131,1.132 configure.in,1.129,1.130
- Index(es):