SMPP: clarify (re)start logic
Having smpp_smsc_stop() called from within smpp_smsc_start() instead of explicitly inside smpp_smsc_restart() is confusing and could lead to hard-to-trace bugs. Let's get this fixed first before going further. Related: OS#5568 Change-Id: I353f5b82c9f5308d93e926538d4ef7e24d0b0339
This commit is contained in:
parent
d20dd22082
commit
4b1202bfdf
|
@ -1011,8 +1011,6 @@ int smpp_smsc_start(struct smsc *smsc, const char *bind_addr, uint16_t port)
|
|||
if (!port)
|
||||
port = 2775;
|
||||
|
||||
smpp_smsc_stop(smsc);
|
||||
|
||||
LOGP(DSMPP, LOGL_NOTICE, "SMPP at %s %d\n",
|
||||
bind_addr? bind_addr : "0.0.0.0", port);
|
||||
|
||||
|
@ -1035,6 +1033,8 @@ int smpp_smsc_restart(struct smsc *smsc, const char *bind_addr, uint16_t port)
|
|||
{
|
||||
int rc;
|
||||
|
||||
smpp_smsc_stop(smsc);
|
||||
|
||||
rc = smpp_smsc_start(smsc, bind_addr, port);
|
||||
if (rc)
|
||||
/* if there is an error, try to re-bind to the old port */
|
||||
|
|
Loading…
Reference in New Issue