Re: Bug in wsp_unit.c ?
Stipe Tolj <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | Wapme Systems AG |
| Message-ID | <[email protected]> |
> Seems that there is bug in wsp_unit.c
>
> static void main_thread(void *arg) {
> WAPEvent *e;
> WAPEvent *newevent;
>
> while (run_status == running && (e = list_consume(queue)) != NULL) {
> wap_event_assert(e);
> switch (e->type) {
> case T_DUnitdata_Ind:
> newevent = unpack_datagram(e);
> /* MUST BE INSERTED if (newevent != NULL) */
> dispatch_to_appl(newevent);
>
> unpack_datagram returns NULL
> (> 2002-11-12 09:21:45 [2] WARNING: WSP PDU with unknown type -1)
> and dispatch NULL to wap-appl.c
>
> So later in wap-appl.c we have (main_thread):
> while (run_status == running && (ind = list_consume(queue)) != NULL) {
> }
>
> and list_consume breaks the loop and
>
> > 2002-11-12 09:21:45 [6] DEBUG: Thread 6 (gw/wap-appl.c:main_thread) terminates.
>
> So any following requests will not be processed.
>
> I think we must insert check for NULL (see above, line /* MUST BE INSERTED)
what do the others think?!
Can you sum up on how to reproduce the problem.
Stipe
[email protected]
-------------------------------------------------------------------
Wapme Systems AG
Vogelsanger Weg 80
40470 Düsseldorf
Tel: +49-211-74845-0
Fax: +49-211-74845-299
E-Mail: [email protected]
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are