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>
This commit is contained in:
parent
fde82f554b
commit
2529320420
|
@ -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");
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue