libmsc/ussd: don't overwrite rc if decoding failed

Change-Id: I344e4b3a9aad617686a7ddbdeae5780fd8b07e58
This commit is contained in:
Vadim Yanitskiy 2018-04-04 06:21:45 +07:00 committed by Harald Welte
parent fe4ba7c057
commit 048eb30684
1 changed files with 3 additions and 2 deletions

View File

@ -74,8 +74,9 @@ int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg)
if (!rc) {
LOGP(DMM, LOGL_ERROR, "SS/USSD message parsing error, "
"rejecting request...\n");
rc = gsm0480_send_ussd_reject(conn, &req);
return rc;
gsm0480_send_ussd_reject(conn, &req);
/* The GSM 04.80 API uses inverted codes (0 means error) */
return -EPROTO;
}
/* Interrogation or releaseComplete? */