On Sat, Sep 13, 2003 at 07:32:03AM +0700, adi wrote:
> I wonder why should that macro being check on
> url_result_thread(). The existing code would cause
> the message (the response) would never be sent, if
> one enable X-Kannel-DLR-Mask.

Seems that noone would be interested with question :-)

Here is my proposed patch for smsbox.c suppose to not
to simply drop the msg with dlr_mask not empty.

Please comments.

Regards,

P.Y. Adi Prasaja


*** /sources/kannel/cvs/gateway/gw/smsbox.c     2003-08-27 05:00:18.000000000 +0700
--- smsbox.c    2003-09-26 05:20:38.000000000 +0700
***************
*** 302,307 ****
--- 302,308 ----
        /* to remember if it's a DLR http get */
      
      receiver->trans = trans;
+     receiver->msg->sms.sms_type = msg->sms.sms_type;
  
      /* remember the HTTP request if we need to queue this */
      receiver->method = method;
***************
*** 1068,1081 ****
          if (reply_body == NULL)
              reply_body = octstr_imm("");
  
-         if (!DLR_IS_ENABLED(msg->sms.dlr_mask)) {
              alog("SMS HTTP-request sender:%s request: '%s' "
                   "url: '%s' reply: %d '%s'",
                   octstr_get_cstr(msg->sms.receiver),
                   (msg->sms.msgdata != NULL) ? octstr_get_cstr(msg->sms.msgdata) : "",
                   octstr_get_cstr(final_url), status,  
                   (status == HTTP_OK) ? "<< successful >>" : 
octstr_get_cstr(reply_body));
-         }
  
  requeued:
          octstr_destroy(final_url);
--- 1069,1080 ----
***************
*** 1085,1091 ****
          http_destroy_headers(req_headers);
          octstr_destroy(req_body);
      
!         if (!DLR_IS_ENABLED(msg->sms.dlr_mask) && !queued) {
              if (send_message(trans, msg) < 0)
                  error(0, "failed to send message to phone");
          }     
--- 1084,1090 ----
          http_destroy_headers(req_headers);
          octstr_destroy(req_body);
      
!         if (msg->sms.sms_type != report && !queued) {
              if (send_message(trans, msg) < 0)
                  error(0, "failed to send message to phone");
          }     

Reply via email to