summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-09-25 18:09:01 +0700
committerHarald Welte <laforge@gnumonks.org>2018-10-21 12:56:54 +0000
commitee86b0488332b7d863cfbe64298d86895d11ea05 (patch)
treeef2e424fed1d35eeb336b74122c144d2fd212a58 /src
parent6721144c80c1160e28a2da86b0f33e050fe9adaf (diff)
libosmogsm/gsup.c: fix error code in osmo_gsup_encode()
Missing (unset) type of to be encoded message is not a memory allocation failure (-ENOMEM), this is definitely a mistake. Change-Id: Ibbac18e2b68b765c17c2bc959c4c085037953a7f
Diffstat (limited to 'src')
-rw-r--r--src/gsm/gsup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c
index 9c2f8175..18b35806 100644
--- a/src/gsm/gsup.c
+++ b/src/gsm/gsup.c
@@ -535,7 +535,7 @@ int osmo_gsup_encode(struct msgb *msg, const struct osmo_gsup_message *gsup_msg)
/* generic part */
if(!gsup_msg->message_type)
- return -ENOMEM;
+ return -EINVAL;
msgb_v_put(msg, gsup_msg->message_type);