SMPP: use default port via #define

Related: OS#5568
Change-Id: I2140ed57e64f17fb79130014eaf88f58b62d7a00
This commit is contained in:
Max 2022-10-15 15:59:16 +03:00
parent 9683b5f991
commit 40a71d1c4c
3 changed files with 4 additions and 6 deletions

View File

@ -2,6 +2,8 @@
#include <osmocom/msc/gsm_data.h>
#define SMPP_DEFAULT_PORT 2775
/* Length limits according to SMPP 3.4 spec including NUL-byte: */
#define SMPP_SYS_ID_LEN 15
#define SMPP_PASSWD_LEN 8

View File

@ -974,12 +974,8 @@ int smpp_smsc_start(struct smsc *smsc, const char *bind_addr, uint16_t port)
{
int rc;
/* default port for SMPP */
if (!port)
port = 2775;
LOGP(DSMPP, LOGL_NOTICE, "SMPP at %s %d\n",
bind_addr? bind_addr : "0.0.0.0", port);
bind_addr ? bind_addr : "0.0.0.0", port ? port : SMPP_DEFAULT_PORT);
rc = osmo_sock_init_ofd(&smsc->listen_ofd, AF_UNSPEC, SOCK_STREAM,
IPPROTO_TCP, bind_addr, port,

View File

@ -244,7 +244,7 @@ static int smpp_esme_init(struct esme *esme, const char *host, uint16_t port)
int rc;
if (port == 0)
port = 2775;
port = SMPP_DEFAULT_PORT;
esme->wqueue.bfd.data = esme;
esme->wqueue.read_cb = esme_read_cb;