Bug in wap_push_ppg.c ?
The push response seems to be inconsistent with the DTD for this spec. Specifically, the child element response-result is outside the push-response element when according to the DTD and the PAP spec (wap-247,section 8.3 page 21) it should be inside the push-response element. Attached is a patch which may not apply as my srcs are a little out of sync... Patch: RCS file: /home/cvs/cvsroot/wirelesswindow/gw/wap_push_ppg.c,v retrieving revision 1.28 diff -r1.28 wap_push_ppg.c 2774d2773 /push-response 2786a2786 /push-response 2794c2794,2795 debug(wap.push.ppg, 0, PPG: send_push_response: telling pi); --- debug(wap.push.ppg, 0, PPG: send_push_response: telling pi (%s), octstr_get_cstr (reply_body)); Paul Keogh ANAM Wireless Internet Solutions http://www.anam.com +353 1 284 7555 (wired) +353 86 234 6047 (wireless) Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland
Re: Bug in wap_push_ppg.c ?
Yeah. Thanks for the report. Aarno On Monday, November 18, 2002, at 02:52 PM, Paul Keogh wrote: The push response seems to be inconsistent with the DTD for this spec. Specifically, the child element response-result is outside the push-response element when according to the DTD and the PAP spec (wap-247,section 8.3 page 21) it should be inside the push-response element. Attached is a patch which may not apply as my srcs are a little out of sync... Patch: RCS file: /home/cvs/cvsroot/wirelesswindow/gw/wap_push_ppg.c,v retrieving revision 1.28 diff -r1.28 wap_push_ppg.c 2774d2773 /push-response 2786a2786 /push-response 2794c2794,2795 debug(wap.push.ppg, 0, PPG: send_push_response: telling pi); --- debug(wap.push.ppg, 0, PPG: send_push_response: telling pi (%s), octstr_get_cstr (reply_body)); Paul Keogh ANAM Wireless Internet Solutions http://www.anam.com +353 1 284 7555 (wired) +353 86 234 6047 (wireless) Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland
Bug in wap_push_ppg.c ?
The function send_to_pi () takes a first argument of HTTPClient *c. This is passed directly to http_send_reply (c...). If the c is NULL http_send_reply () crashes as it immediately deferences c. I don't think send_to_pi () should assume that the PI is still around and hence should check that the HTTPClient ptr is non-NULL before invoking http_send_reply (). Paul Keogh ANAM Wireless Internet Solutions http://www.anam.com +353 1 284 7555 (wired) +353 86 234 6047 (wireless) Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland
Re: Bug in wap_push_ppg.c ?
Yeah. Thanks. Aarno Paul Keogh wrote: The function send_to_pi () takes a first argument of HTTPClient *c. This is passed directly to http_send_reply (c...). If the c is NULL http_send_reply () crashes as it immediately deferences c. I don't think send_to_pi () should assume that the PI is still around and hence should check that the HTTPClient ptr is non-NULL before invoking http_send_reply (). Paul Keogh ANAM Wireless Internet Solutions http://www.anam.com +353 1 284 7555 (wired) +353 86 234 6047 (wireless) Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland
Re: Bug in wap_push_ppg.c ?
Paul Keogh wrote: I think the function; /* * Check that we have rigth application id for confirmed push (it is, push.sia) */ static int coriented_deliverable(long appid_code) { return appid_code == 2; } should be static int coriented_deliverable(long appid_code) { return appid_code == 1; } This would then match the wap/wsp_strings definitions of; NUMBERED(application_id, ASSIGN(*, 0x00) ASSIGN(push.sia, 0x01) ASSIGN(wml.ua, 0x02) ASSIGN(wta.ua, 0x03) ASSIGN(mms.ua, 0x04) ASSIGN(push.syncml, 0x05) ASSIGN(loc.ua, 0x06) ) Right ? any comments from you Aarno? Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 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