[PATCH] DLRs crash smsbox using CIMD2

2003-02-06 Thread Dariusz Markowicz
Hi list,

It looks like the lastest patch to urltrans.c solved problem of crash smsbox
using CIMD2. So it is now possible to enable DLR support in cimd2 module.
This patch enable DLR and fix possible memory leak problem. ts (timestamp)
was not always destroy because it was executed from if block, so I moved it
outside.

--- smsc_cimd2.c.cvsThu Feb  6 12:55:00 2003
+++ smsc_cimd2.cThu Feb  6 12:54:12 2003
@@ -1588,8 +1588,7 @@
 goto io_error;

 next_reply:
-/*reply = cimd2_get_packet(smsc,ts);*/
-reply = cimd2_get_packet(smsc, NULL);
+reply = cimd2_get_packet(smsc,ts);
 if (!reply)
 goto io_error;

@@ -1880,9 +1879,9 @@
 octstr_get_cstr(msg-sms.dlr_url),
 msg-sms.dlr_mask,
 octstr_get_cstr(msg-sms.boxc_id));
-octstr_destroy(ts);
-ts = NULL;
}
+octstr_destroy(ts);
+ts = NULL;
if (ret == 0 || ret == -1)
 break;
 if (cimd2_reopen(smsc)  0) {

Please comment and vote.

Best regards,
Dariusz Markowicz



smsc_cimd2.diff
Description: Binary data


Re: [PATCH] DLRs crash smsbox using CIMD2

2003-02-06 Thread Stipe Tolj
 --- smsc_cimd2.c.cvsThu Feb  6 12:55:00 2003
 +++ smsc_cimd2.cThu Feb  6 12:54:12 2003
 @@ -1588,8 +1588,7 @@
  goto io_error;
 
  next_reply:
 -/*reply = cimd2_get_packet(smsc,ts);*/
 -reply = cimd2_get_packet(smsc, NULL);
 +reply = cimd2_get_packet(smsc,ts);
  if (!reply)
  goto io_error;
 
 @@ -1880,9 +1879,9 @@
  octstr_get_cstr(msg-sms.dlr_url),
  msg-sms.dlr_mask,
  octstr_get_cstr(msg-sms.boxc_id));
 -octstr_destroy(ts);
 -ts = NULL;
 }
 +octstr_destroy(ts);
 +ts = NULL;
 if (ret == 0 || ret == -1)
  break;
  if (cimd2_reopen(smsc)  0) {
 
 Please comment and vote.

+1, commited to cvs.

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