laforge has submitted this change. ( https://gerrit.osmocom.org/c/libsmpp34/+/29987 )
Change subject: test_apps: Fix compilation of example smsc code ......................................................................
test_apps: Fix compilation of example smsc code
Change-Id: I12f4daefaa07a1c1b42dc295724e3ec0bdcddfd7 --- M test_apps/smpp_smsc.c M test_apps/smsc_main.c 2 files changed, 5 insertions(+), 3 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved
diff --git a/test_apps/smpp_smsc.c b/test_apps/smpp_smsc.c index 7312980..85d30ed 100644 --- a/test_apps/smpp_smsc.c +++ b/test_apps/smpp_smsc.c @@ -498,7 +498,7 @@ }
/* call-back of write queue once it wishes to write a message to the socket */ -static void esme_link_write_cb(struct osmo_fd *ofd, struct msgb *msg) +static int esme_link_write_cb(struct osmo_fd *ofd, struct msgb *msg) { struct osmo_esme *esme = ofd->data; int rc; @@ -511,8 +511,10 @@ smpp_esme_put(esme); } else if (rc < msgb_length(msg)) { LOGP(DSMPP, LOGL_ERROR, "%s: Short write\n", esme->system_id); - return; + return -1; } + + return 0; }
/* callback for already-accepted new TCP socket */ diff --git a/test_apps/smsc_main.c b/test_apps/smsc_main.c index e60ac23..e1aafd1 100644 --- a/test_apps/smsc_main.c +++ b/test_apps/smsc_main.c @@ -34,7 +34,7 @@ struct smsc *smsc = talloc_zero(NULL, struct smsc); int rc;
- osmo_init_logging(&log_info); + osmo_init_logging2(smsc, &log_info);
strcpy(smsc->system_id, "OpenBSC"); rc = smpp_smsc_init(smsc, 6080);