SMPP: make smpp_smsc_stop() static
It's only used in a single file so there's no point exposing it via header. Related: OS#5568 Change-Id: I3d0d850ffe6ebf9d623c1f250d4293a3c427d5d8
This commit is contained in:
parent
40d3497877
commit
634591e85b
|
@ -107,7 +107,6 @@ struct smsc *smpp_smsc_alloc_init(void *ctx);
|
|||
int smpp_smsc_conf(struct smsc *smsc, const char *bind_addr, uint16_t port);
|
||||
int smpp_smsc_start(struct smsc *smsc, const char *bind_addr, uint16_t port);
|
||||
int smpp_smsc_restart(struct smsc *smsc, const char *bind_addr, uint16_t port);
|
||||
void smpp_smsc_stop(struct smsc *smsc);
|
||||
|
||||
void smpp_esme_get(struct smpp_esme *esme);
|
||||
void smpp_esme_put(struct smpp_esme *esme);
|
||||
|
|
|
@ -966,6 +966,16 @@ int smpp_smsc_conf(struct smsc *smsc, const char *bind_addr, uint16_t port)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*! /brief Close SMPP connection. */
|
||||
static void smpp_smsc_stop(struct smsc *smsc)
|
||||
{
|
||||
if (smsc->listen_ofd.fd > 0) {
|
||||
close(smsc->listen_ofd.fd);
|
||||
smsc->listen_ofd.fd = 0;
|
||||
osmo_fd_unregister(&smsc->listen_ofd);
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Bind to given address and port and accept connections.
|
||||
* \param[in] bind_addr Local IP address, may be NULL for any.
|
||||
* \param[in] port TCP port number, may be 0 for default SMPP (2775).
|
||||
|
@ -1004,13 +1014,3 @@ int smpp_smsc_restart(struct smsc *smsc, const char *bind_addr, uint16_t port)
|
|||
return smpp_smsc_start(smsc, smsc->bind_addr, smsc->listen_port);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! /brief Close SMPP connection. */
|
||||
void smpp_smsc_stop(struct smsc *smsc)
|
||||
{
|
||||
if (smsc->listen_ofd.fd > 0) {
|
||||
close(smsc->listen_ofd.fd);
|
||||
smsc->listen_ofd.fd = 0;
|
||||
osmo_fd_unregister(&smsc->listen_ofd);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue