sms: MO RP ACK and RP ERROR should be also forwarded to the sms socket

This commit is contained in:
Ivan Kluchnikov 2015-12-29 19:23:58 +03:00
parent 59dc70462b
commit c301ef4ea7
1 changed files with 13 additions and 0 deletions

View File

@ -600,6 +600,10 @@ static int gsm411_rx_rp_ack(struct msgb *msg, struct gsm_trans *trans,
{
struct gsm_sms *sms = trans->sms.sms;
if (trans->net->sms_client) {
return subscr_tx_sms_message(trans->subscr, rph);
}
/* Acnkowledgement to MT RP_DATA, i.e. the MS confirms it
* successfully received a SMS. We can now safely mark it as
* transmitted */
@ -637,6 +641,15 @@ static int gsm411_rx_rp_error(struct msgb *msg, struct gsm_trans *trans,
subscr_name(trans->conn->subscr), cause_len, cause,
get_value_string(gsm411_rp_cause_strs, cause));
if (trans->net->sms_client) {
if (cause == GSM411_RP_CAUSE_MT_MEM_EXCEEDED) {
osmo_counter_inc(net->stats.sms.rp_err_mem);
} else {
osmo_counter_inc(net->stats.sms.rp_err_other);
}
return subscr_tx_sms_message(trans->subscr, rph);
}
if (!sms) {
LOGP(DLSMS, LOGL_ERROR,
"RX RP-ERR, but no sms in transaction?!?\n");