diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index 2fab20b11..86d249376 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -414,7 +414,7 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn, gh = msgb_l3(msg); if (msgb_l3len(msg) - sizeof(*gh) != 1) { - LOGP(DMSC, LOGL_ERROR, "Assignment Compl invalid: %lu\n", + LOGP(DMSC, LOGL_ERROR, "Assignment Compl invalid: %u\n", msgb_l3len(msg) - sizeof(*gh)); return; } @@ -455,7 +455,7 @@ static void handle_ass_fail(struct gsm_subscriber_connection *conn, gh = msgb_l3(msg); if (msgb_l3len(msg) - sizeof(*gh) != 1) { - LOGP(DMSC, LOGL_ERROR, "assignemnt failure unhandled: %lu\n", + LOGP(DMSC, LOGL_ERROR, "assignemnt failure unhandled: %u\n", msgb_l3len(msg) - sizeof(*gh)); rr_failure = NULL; } else { diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index b57a05099..8a7ff90ca 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -781,7 +781,7 @@ int db_sync_subscriber(struct gsm_subscriber *subscriber) subscriber->authorized, q_tmsi, subscriber->lac, - subscriber->expire_lu, + (int) subscriber->expire_lu, subscriber->imsi); free(q_tmsi); diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c index 511d62f11..452de62d5 100644 --- a/openbsc/src/libmsc/osmo_msc.c +++ b/openbsc/src/libmsc/osmo_msc.c @@ -142,8 +142,6 @@ struct bsc_api *msc_bsc_api() { /* lchan release handling */ void msc_release_connection(struct gsm_subscriber_connection *conn) { - struct gsm_trans *trans; - /* skip when we are in release, e.g. due an error */ if (conn->in_release) return; diff --git a/openbsc/src/libmsc/smpp_smsc.c b/openbsc/src/libmsc/smpp_smsc.c index 1dc37fdd8..64ed2005f 100644 --- a/openbsc/src/libmsc/smpp_smsc.c +++ b/openbsc/src/libmsc/smpp_smsc.c @@ -267,18 +267,6 @@ void smpp_esme_put(struct osmo_esme *esme) esme_destroy(esme); } -static struct osmo_esme * -esme_by_system_id(const struct smsc *smsc, char *system_id) -{ - struct osmo_esme *e; - - llist_for_each_entry(e, &smsc->esme_list, list) { - if (!strcmp(e->system_id, system_id)) - return e; - } - return NULL; -} - /*! \brief try to find a SMPP route (ESME) for given destination */ struct osmo_esme * smpp_route(const struct smsc *smsc, const struct osmo_smpp_addr *dest) @@ -845,7 +833,7 @@ dead_socket: } /* 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; @@ -858,8 +846,10 @@ static void esme_link_write_cb(struct osmo_fd *ofd, struct msgb *msg) 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/openbsc/src/libmsc/smpp_smsc.h b/openbsc/src/libmsc/smpp_smsc.h index 86fbeb5f0..747dc3a2c 100644 --- a/openbsc/src/libmsc/smpp_smsc.h +++ b/openbsc/src/libmsc/smpp_smsc.h @@ -124,4 +124,6 @@ int smpp_route_pfx_add(struct osmo_smpp_acl *acl, const struct osmo_smpp_addr *pfx); int smpp_route_pfx_del(struct osmo_smpp_acl *acl, const struct osmo_smpp_addr *pfx); + +int smpp_vty_init(void); #endif diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index c82ffc967..72abcf427 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -337,7 +337,7 @@ static int verify_bts_loc(struct ctrl_cmd *cmd, const char *value, void *data) char *saveptr, *latstr, *lonstr, *heightstr, *tstampstr, *validstr, *tmp; time_t tstamp; int valid; - double lat, lon, height; + double lat, lon, height __attribute__((unused)); tmp = talloc_strdup(cmd, value); if (!tmp) diff --git a/openbsc/src/utils/smpp_mirror.c b/openbsc/src/utils/smpp_mirror.c index 213c681e6..59e341d38 100644 --- a/openbsc/src/utils/smpp_mirror.c +++ b/openbsc/src/utils/smpp_mirror.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include