diff options
author | Max <msuraev@sysmocom.de> | 2022-07-30 17:11:25 +0700 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2022-07-30 18:41:14 +0700 |
commit | 6973a241a89ce28d635a5102246453490a6e6722 (patch) | |
tree | c85e1cd88b4a6a2b191a70cf57215142c1861349 /src/libmsc/smpp_vty.c | |
parent | 6c4f23df5e70e3499965f80c0277deb3a0d54f36 (diff) |
libosmonetify SMPP
Use libosmo-netif instead of socket interface.
Note: osmo_stream_srv_recv() is not used for now to keep as much of existing
code as possible and make troubleshooting easier.
Related: OS#5568
Change-Id: Idc2e60af1010783e555e61b114ae61f55a89d890
Signed-off-by: Max <msuraev@sysmocom.de>
Diffstat (limited to 'src/libmsc/smpp_vty.c')
-rw-r--r-- | src/libmsc/smpp_vty.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libmsc/smpp_vty.c b/src/libmsc/smpp_vty.c index e8842d2e9..a8abfb5e9 100644 --- a/src/libmsc/smpp_vty.c +++ b/src/libmsc/smpp_vty.c @@ -27,7 +27,7 @@ #include <osmocom/vty/command.h> #include <osmocom/vty/buffer.h> #include <osmocom/vty/vty.h> - +#include <osmocom/netif/stream.h> #include <osmocom/core/linuxlist.h> #include <osmocom/core/utils.h> #include <osmocom/core/socket.h> @@ -81,7 +81,7 @@ static int smpp_local_tcp(struct vty *vty, const char *bind_addr, uint16_t port) { struct smsc *smsc = smsc_from_vty(vty); - int is_running = smsc->listen_ofd.fd > 0; + bool is_running = smsc->link; int same_bind_addr; int rc; @@ -188,7 +188,7 @@ static int config_write_smpp(struct vty *vty) vty_out(vty, " local-tcp-ip %s %u%s", smsc->bind_addr, smsc->listen_port, VTY_NEWLINE); else - vty_out(vty, " local-tcp-port %u%s", smsc->listen_port, + vty_out(vty, " local-tcp-port %u%s", smsc->listen_port ? smsc->listen_port : SMPP_DEFAULT_PORT, VTY_NEWLINE); if (strlen(smsc->system_id) > 0) vty_out(vty, " system-id %s%s", smsc->system_id, VTY_NEWLINE); @@ -528,7 +528,7 @@ static void dump_one_esme(struct vty *vty, struct osmo_esme *esme) vty_out(vty, "ESME System ID: %s, Password: %s, SMPP Version %02x%s", esme->esme->system_id, esme->acl ? esme->acl->passwd : "", esme->smpp_version, VTY_NEWLINE); - vty_out(vty, " Connection %s%s", osmo_sock_get_name(tall_vty_ctx, esme->esme->wqueue.bfd.fd), VTY_NEWLINE); + vty_out(vty, " Connection %s%s", osmo_stream_srv_link_get_sockname(esme->smsc->link), VTY_NEWLINE); if (esme->smsc->def_route == esme->acl) vty_out(vty, " Is current default route%s", VTY_NEWLINE); } |