diff options
author | Max <msuraev@sysmocom.de> | 2022-07-27 21:56:49 +0700 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2022-07-30 15:36:03 +0700 |
commit | 9a1daf97fe2b0513d8795efaa5a7f00f7e2a0d16 (patch) | |
tree | 03598ed575af8dd61e839fbf2b5bba9949b26576 | |
parent | 99ab7c57dabde2bb6936eac9c8eabf2d4a11fc5d (diff) |
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
-rw-r--r-- | src/libmsc/smpp_smsc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmsc/smpp_smsc.c b/src/libmsc/smpp_smsc.c index 34391c2c6..4ba52fc77 100644 --- a/src/libmsc/smpp_smsc.c +++ b/src/libmsc/smpp_smsc.c @@ -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 */ |