Hi,

As it's really trivial, and havn't response from Gareth,
here is a patch that fixes this issue.

- Returning HTTP_OK status code 200 when receiving an MO from clickatell
- Returning HTTP_BAD_REQUEST status code 400 is sent when "Insufficient 
arguments, rejected"
(cf from w3c)
"10.4.1 400 Bad Request
The request could not be understood by the server due to malformed syntax. The 
client SHOULD NOT repeat the request without modifications." 

Any comments ?

Vincent

--
Telemaque - NICE - (FR)
Service Technique - Developpement
http://www.telemaque.fr/
[EMAIL PROTECTED]
Tel : +33 4 93 97 71 64 (fax 68)

----- Original Message ----- 
From: "Vincent CHAVANIS" <[EMAIL PROTECTED]>
To: "Gareth Reakes" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Wednesday, May 10, 2006 4:28 PM
Subject: Re: 404 problem with clickatell MO


You seems right.

httpstatus is initialized to HTTP_UNAUTHORIZED,
If we're receiving an MO, then we will return ret_msg = "Thanks" 
but still have httpstatus = HTTP_UNAUTHORIZED
even on case "Insufficient arguments"

Could you please provide a patch for this.

regards

Vincent


--
Telemaque - NICE - (FR)
Service Technique - Developpement
http://www.telemaque.fr/
[EMAIL PROTECTED]
Tel : +33 4 93 97 71 64 (fax 68)

----- Original Message ----- 
From: "Gareth Reakes" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, May 10, 2006 4:20 PM
Subject: 404 problem with clickatell MO


> 
> 
>    httpstatus = HTTP_OK;
> 
> needs to be added in on line 682 of smsc_http.c from cvs head of today. 
> Otherwise we always send back a 401.
> 
> 
> Gareth
> 
> 
> -- 
> Gareth Reakes, Managing Director           Embrace Mobile
> +44-1865-811197              http://www.embracemobile.com
> 
>


diff -rau /gateway-cvs/gw/smsc/smsc_http.c /gateway/gw/smsc/smsc_http.c
--- /gateway-cvs/gw/smsc/smsc_http.c    2006-04-19 13:03:21.000000000 +0200
+++ /gateway/gw/smsc/smsc_http.c        2006-05-11 15:12:03.000000000 +0200
@@ -679,10 +691,12 @@
  
        /* note: implicit msg_destroy */
        ret = bb_smscconn_receive(conn, momsg);
+        httpstatus = HTTP_OK;
        retmsg = octstr_create("Thanks");
     } else if (apimsgid == NULL || status == NULL || timestamp == NULL || dest 
== NULL) {
         error(0, "HTTP[%s]: Insufficient args.",
               octstr_get_cstr(conn->id));
+        httpstatus = HTTP_BAD_REQUEST;
         retmsg = octstr_create("Insufficient arguments, rejected.");
     } else {
        switch (atoi(octstr_get_cstr(status))) {

Reply via email to