--- smsc_cimd2.c.cvs	Thu Feb  6 12:55:00 2003
+++ smsc_cimd2.c	Thu 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) {
