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
diff --git a/src/libmsc/smpp_smsc.c b/src/libmsc/smpp_smsc.c
index 34391c2..4ba52fc 100644
--- a/src/libmsc/smpp_smsc.c
+++ b/src/libmsc/smpp_smsc.c
@@ -1011,8 +1011,6 @@
 	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 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 */