Re: (unknown)

"Vincent CHAVANIS" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <211601c6704e$1bd45ca0$9600a8c0@vince>
The only problem i can see is the retry which is a bit "aggressive"

2006-05-05 16:01:14.214 [20857] [15] DEBUG: HTTP[HTTP5]: Server is busy/unavailable, re-sending request
2006-05-05 16:01:23.659 [20857] [15] DEBUG: HTTP[HTTP5]: Server is busy/unavailable, re-sending request
2006-05-05 16:01:26.913 [20857] [15] DEBUG: HTTP[HTTP5]: Server is busy/unavailable, re-sending request
2006-05-05 16:01:35.874 [20857] [15] DEBUG: HTTP[HTTP5]: Server is busy/unavailable, re-sending request

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: "Vincent CHAVANIS" <[email protected]>
To: <[email protected]>
Sent: Friday, May 05, 2006 3:38 PM
Subject: Re: (unknown)


That's what i'm just experiencing now...
The SMSC will not reconnect you're right.

I'm currently using this patch and seems ok.

regards

Vincent


--- /gateway-cvs/gw/smsc/smsc_http.c    2006-04-19 13:03:21.000000000 +0200
+++ /gateway/gw/smsc/smsc_http.c        2006-05-05 15:33:06.000000000 +0200
@@ -396,9 +396,19 @@
             octstr_case_compare(body, octstr_imm("Ok.")) == 0 ||
             octstr_ncompare(body, octstr_imm("Result: OK"),10) == 0)) {
         bb_smscconn_sent(conn, msg, NULL);
+    } else if ((status == HTTP_INTERNAL_SERVER_ERROR || status == HTTP_NOT_IMPLEMENTED
+        || status == HTTP_BAD_GATEWAY || status == HTTP_SERVICE_UNAVAILABLE)
+        && (octstr_case_compare(body, octstr_imm("Try again later.")) == 0)) {
+          ConnData *conndata = conn->data;
+          debug("smsc.http.kannel", 0, "HTTP[%s]: Server is busy/unavailable, re-sending request",
+                octstr_get_cstr(conn->id));
+          bb_smscconn_send_failed(conn, msg,
+                      SMSCCONN_FAILED_TEMPORARILY, NULL);
     } else {
+        error(0, "HTTP[%s]: Message was rejected. SMSC reponse was: <%s>",
+              octstr_get_cstr(conn->id), octstr_get_cstr(body));
         bb_smscconn_send_failed(conn, msg,
-                   SMSCCONN_FAILED_MALFORMED, octstr_duplicate(body));
+                    SMSCCONN_FAILED_REJECTED, octstr_duplicate(body));
     }
 }




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

----- Original Message ----- 
From: "Alexander Malysh" <[email protected]>
To: <[email protected]>
Sent: Friday, May 05, 2006 3:28 PM
Subject: Re: (unknown)


> Hi,
> 
> this will not work. You should just call bb_smscconn_failed(.., TMP, 
> ...) and don't set connection status. Because who will set connection to 
> ONLINE status? With this patch you will make connection unusable after 
> first temp. failure.
> 
> Thanks,
> Alex
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.