comparison libfaim/aim_rxhandlers.c @ 900:e18815f5a4e9

[gaim-migrate @ 910] libfaim changes la la la committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 13 Sep 2000 23:48:43 +0000
parents 595ac7759563
children fa681641643d
comparison
equal deleted inserted replaced
899:88d1edcd7cd6 900:e18815f5a4e9
186 u_short family, 186 u_short family,
187 u_short type, 187 u_short type,
188 rxcallback_t newhandler, 188 rxcallback_t newhandler,
189 u_short flags) 189 u_short flags)
190 { 190 {
191 struct aim_rxcblist_t *new,*cur; 191 struct aim_rxcblist_t *newcb,*cur;
192 192
193 if (!conn) 193 if (!conn)
194 return -1; 194 return -1;
195 195
196 faimdprintf(1, "aim_conn_addhandler: adding for %04x/%04x\n", family, type); 196 faimdprintf(1, "aim_conn_addhandler: adding for %04x/%04x\n", family, type);
197 197
198 new = (struct aim_rxcblist_t *)calloc(1, sizeof(struct aim_rxcblist_t)); 198 newcb = (struct aim_rxcblist_t *)calloc(1, sizeof(struct aim_rxcblist_t));
199 new->family = family; 199 newcb->family = family;
200 new->type = type; 200 newcb->type = type;
201 new->flags = flags; 201 newcb->flags = flags;
202 if (!newhandler) 202 if (!newhandler)
203 new->handler = &bleck; 203 newcb->handler = &bleck;
204 else 204 else
205 new->handler = newhandler; 205 newcb->handler = newhandler;
206 new->next = NULL; 206 newcb->next = NULL;
207 207
208 cur = conn->handlerlist; 208 cur = conn->handlerlist;
209 if (!cur) 209 if (!cur)
210 conn->handlerlist = new; 210 conn->handlerlist = newcb;
211 else 211 else
212 { 212 {
213 while (cur->next) 213 while (cur->next)
214 cur = cur->next; 214 cur = cur->next;
215 cur->next = new; 215 cur->next = newcb;
216 } 216 }
217 217
218 return 0; 218 return 0;
219 } 219 }
220 220