mirror of git://git.sysmocom.de/ofono
Use int for MoreMessagestoSend (mms)
This commit is contained in:
parent
d4536b3d2b
commit
4dae83636c
|
@ -240,7 +240,7 @@ err:
|
|||
}
|
||||
|
||||
static void at_cmgs(struct ofono_modem *modem, unsigned char *pdu, int pdu_len,
|
||||
int tpdu_len, gboolean mms, ofono_sms_submit_cb_t cb,
|
||||
int tpdu_len, int mms, ofono_sms_submit_cb_t cb,
|
||||
void *data)
|
||||
{
|
||||
struct at_data *at = ofono_modem_userdata(modem);
|
||||
|
@ -251,9 +251,11 @@ static void at_cmgs(struct ofono_modem *modem, unsigned char *pdu, int pdu_len,
|
|||
if (!cbd)
|
||||
goto error;
|
||||
|
||||
if (mms)
|
||||
g_at_chat_send(at->parser, "AT+CMMS=1", none_prefix,
|
||||
if (mms) {
|
||||
sprintf(buf, "AT+CMMS=%d", mms);
|
||||
g_at_chat_send(at->parser, buf, none_prefix,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
len = sprintf(buf, "AT+CMGS=%d\r", tpdu_len);
|
||||
encode_hex_own_buf(pdu, pdu_len, 0, buf+len);
|
||||
|
|
|
@ -405,7 +405,7 @@ struct ofono_sms_ops {
|
|||
const struct ofono_phone_number *sca,
|
||||
ofono_generic_cb_t cb, void *data);
|
||||
void (*submit)(struct ofono_modem *modem, unsigned char *pdu,
|
||||
int pdu_len, int tpdu_len, gboolean mms,
|
||||
int pdu_len, int tpdu_len, int mms,
|
||||
ofono_sms_submit_cb_t cb, void *data);
|
||||
};
|
||||
|
||||
|
|
|
@ -314,7 +314,7 @@ static gboolean tx_next(gpointer user_data)
|
|||
struct ofono_modem *modem = user_data;
|
||||
struct sms_manager_data *sms = modem->sms_manager;
|
||||
time_t ts;
|
||||
gboolean send_mms = FALSE;
|
||||
int send_mms = 0;
|
||||
struct pending_pdu *pdu = g_queue_peek_head(sms->txq);
|
||||
struct ofono_error error;
|
||||
|
||||
|
@ -329,7 +329,7 @@ static gboolean tx_next(gpointer user_data)
|
|||
|
||||
if ((g_queue_get_length(sms->txq) > 1) &&
|
||||
((ts - sms->last_mms) > 60))
|
||||
send_mms = TRUE;
|
||||
send_mms = 1;
|
||||
|
||||
sms->ops->submit(modem, pdu->pdu, pdu->pdu_len, pdu->tpdu_len, send_mms,
|
||||
tx_finished, modem);
|
||||
|
|
Loading…
Reference in New Issue