laforge has uploaded this change for review.

View Change

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(-)

git pull ssh://gerrit.osmocom.org:29418/libsmpp34 refs/changes/87/29987/1
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);

To view, visit change 29987. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libsmpp34
Gerrit-Branch: master
Gerrit-Change-Id: I12f4daefaa07a1c1b42dc295724e3ec0bdcddfd7
Gerrit-Change-Number: 29987
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-MessageType: newchange