Project

General

Profile

Bug #755

Bearbox panic if SMSC is unavailable

Added by Mauricio Querves about 4 years ago. Updated about 4 years ago.

Status:
Feedback
Priority:
High
Assignee:
-
Category:
General SMSC
Target version:
Start date:
05/20/2016
Due date:
% Done:

0%

Estimated time:
Affected version:
svn

Description

When a SMSC connection is not available or reachable at the moment of bring up Kannel, it hill send a Panic message, won't continue loading the others connections and also it have a null Pointer because of a call to conn->dead_start

To reproduce do this:

Configure two or more SMSC connection, one of them should point somewhere where where it can't connect.
Start Kannel (bearbox + smsbox )

NOTE: I think that even if a connection could not be available in the moment of the Kannel start, it still should start the service.

I the attached file is a patch to avoid this problem. I tried to send to the devel list but I couldn't subscribe ...

History

#1 Updated by Mauricio Querves about 4 years ago

Adding the patch because i dont know if you can see it attached.

--- gw/bb_smscconn.c    (revision 5163)
+++ gw/bb_smscconn.c    (working copy)
@@ -927,7 +927,7 @@
         for (j = 0; j < m; j++) {
             conn = smscconn_create(grp, 1);
             if (conn == NULL)
-                panic(0, "Cannot start with SMSC connection failing");
+                panic(0, "Starting SMSC  with connection failing");
             gwlist_append(smsc_list, conn);
         }
     }
@@ -1234,7 +1234,9 @@
     gw_rwlock_rdlock(&smsc_list_lock);
     for (i = 0; i < gwlist_len(smsc_list); i++) {
         conn = gwlist_get(smsc_list, i);
-        if (!is_init || !conn->dead_start) {
+        if (conn == NULL)
+        continue;
+    if (!is_init || !conn->dead_start) {
             smscconn_start(conn);
         } else {
             /* Shutdown the connections that are not configured to start at boot */

#2 Updated by Alexander Malysh about 4 years ago

  • Status changed from New to Feedback

Hi,

your patch doesn't make sense for me. I never saw such crash.

Can you please post some debug logs?

Thanks,
Alex

Also available in: Atom PDF