aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/utils')
-rw-r--r--openbsc/src/utils/smpp_mirror.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/openbsc/src/utils/smpp_mirror.c b/openbsc/src/utils/smpp_mirror.c
index cf3657e39..2f154db49 100644
--- a/openbsc/src/utils/smpp_mirror.c
+++ b/openbsc/src/utils/smpp_mirror.c
@@ -85,7 +85,13 @@ static int pack_and_send(struct esme *esme, uint32_t type, void *ptr)
}
msgb_put(msg, rlen);
- return osmo_wqueue_enqueue(&esme->wqueue, msg);
+ if (osmo_wqueue_enqueue(&esme->wqueue, msg) != 0) {
+ LOGP(DSMPP, LOGL_ERROR, "[%s] Write queue full. Dropping message\n",
+ esme->system_id);
+ msgb_free(msg);
+ return -EAGAIN;
+ }
+ return 0;
}
/* FIXME: merge with smpp_smsc.c */