summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2013-05-18 11:34:13 +0200
committerSylvain Munaut <tnt@246tNt.com>2013-05-23 08:22:48 +0200
commit25293204200f4dadcd5ffcbe0f884b06829a49c7 (patch)
tree8f561bf925ccf00b5b4ba8ffde6ad46746ebc9bb /src
parentfde82f554b4d3d1534b13b6d42f528eb933fd2f5 (diff)
host/mobile: Fix trans_assign_trans_id() users error checking
The returned value of trans_assign_trans_id() must be stored into a 'int' rather than uint8_t to allow proper testing of negative return values (errors). Thanks to Bhaskar <niceguy108@gmail.com> for the original patches. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src')
-rw-r--r--src/host/layer23/src/mobile/gsm411_sms.c2
-rw-r--r--src/host/layer23/src/mobile/gsm480_ss.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c
index 9de1259e..655fe535 100644
--- a/src/host/layer23/src/mobile/gsm411_sms.c
+++ b/src/host/layer23/src/mobile/gsm411_sms.c
@@ -625,7 +625,7 @@ static int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca,
uint8_t *data, *rp_ud_len;
uint8_t msg_ref = 42;
int rc;
- uint8_t transaction_id;
+ int transaction_id;
uint8_t sca[11]; /* max len per 03.40 */
LOGP(DLSMS, LOGL_INFO, "..._sms_submit()\n");
diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c
index fda62881..ab8e164c 100644
--- a/src/host/layer23/src/mobile/gsm480_ss.c
+++ b/src/host/layer23/src/mobile/gsm480_ss.c
@@ -564,7 +564,7 @@ static int gsm480_tx_ussd(struct gsm_trans *trans, uint8_t msg_type,
int ss_send(struct osmocom_ms *ms, const char *code, int new_trans)
{
struct gsm_trans *trans = NULL, *transt;
- uint8_t transaction_id;
+ int transaction_id;
/* look for an old transaction */
if (!new_trans) {