CVS: beepcore-c/core/generic CBEEP.c,1.15,1.16
Chris Hanson <[email protected]> Tue, 13 Aug 2002 10:34:44 -0700
| Newsgroups | gmane.network.beep.beepcore.c.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/beepcore-c/beepcore-c/core/generic
In directory usw-pr-cvs1:/tmp/cvs-serv17814/core/generic
Modified Files:
CBEEP.c
Log Message:
Miscellaneous small changes from Matt Small.
Index: CBEEP.c
===================================================================
RCS file: /cvsroot/beepcore-c/beepcore-c/core/generic/CBEEP.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** CBEEP.c 2 Aug 2002 18:14:54 -0000 1.15
--- CBEEP.c 13 Aug 2002 17:34:42 -0000 1.16
***************
*** 232,245 ****
}
static void forget_channel(struct session * s, struct channel * c) {
PRE(s != NULL);
PRE(c != NULL);
if (s->channel == c) {
s->channel = c->next;
c->next = NULL;
} else {
struct channel * prev;
prev = s->channel;
! while (prev->next != NULL && prev->next != c) {
prev = prev->next;
}
--- 232,251 ----
}
+ /* Forget channel c from session s.
+ If s has no channels, nothing is done. */
+
static void forget_channel(struct session * s, struct channel * c) {
PRE(s != NULL);
PRE(c != NULL);
+
if (s->channel == c) {
s->channel = c->next;
c->next = NULL;
+ } else if (s->channel == NULL) {
+ return;
} else {
struct channel * prev;
prev = s->channel;
! while ((prev->next != NULL) && (prev->next != c)) {
prev = prev->next;
}
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31