debug log for sms: fix/add
One logged the wrong function name. Add others. Change-Id: Ied5d8e84d5d192c826bc131be8907eaa55190479
This commit is contained in:
parent
ffaed9eed2
commit
1e918c3d31
|
@ -888,7 +888,7 @@ int gsm411_send_sms(struct gsm_subscriber_connection *conn, struct gsm_sms *sms)
|
|||
return -EBUSY;
|
||||
}
|
||||
|
||||
DEBUGP(DLSMS, "send_sms_lchan()\n");
|
||||
DEBUGP(DLSMS, "%s()\n", __func__);
|
||||
|
||||
/* FIXME: allocate transaction with message reference */
|
||||
trans = trans_alloc(conn->bts->network, conn->subscr,
|
||||
|
@ -996,10 +996,14 @@ int gsm411_send_sms_subscr(struct gsm_subscriber *subscr,
|
|||
* if yes, send the SMS this way */
|
||||
conn = connection_for_subscr(subscr);
|
||||
if (conn) {
|
||||
LOGP(DLSMS, LOGL_DEBUG, "Sending SMS via already open connection %p to %s\n",
|
||||
conn, subscr_name(subscr));
|
||||
return gsm411_send_sms(conn, sms);
|
||||
}
|
||||
|
||||
/* if not, we have to start paging */
|
||||
LOGP(DLSMS, LOGL_DEBUG, "Sending SMS: no connection open, start paging %s\n",
|
||||
subscr_name(subscr));
|
||||
res = subscr_request_channel(subscr, RSL_CHANNEED_SDCCH,
|
||||
paging_cb_send_sms, sms);
|
||||
if (!res) {
|
||||
|
|
|
@ -225,10 +225,14 @@ static void sms_submit_pending(void *_data)
|
|||
|
||||
|
||||
sms = take_next_sms(smsq);
|
||||
if (!sms)
|
||||
if (!sms) {
|
||||
LOGP(DLSMS, LOGL_DEBUG, "Sending SMS done (%d attempted)\n",
|
||||
attempted);
|
||||
break;
|
||||
}
|
||||
|
||||
rounds += 1;
|
||||
LOGP(DLSMS, LOGL_DEBUG, "Sending SMS round %d\n", rounds);
|
||||
|
||||
/*
|
||||
* This code needs to detect a loop. It assumes that no SMS
|
||||
|
@ -243,6 +247,8 @@ static void sms_submit_pending(void *_data)
|
|||
first_sub = sms->receiver->id;
|
||||
initialized = 1;
|
||||
} else if (first_sub == sms->receiver->id) {
|
||||
LOGP(DLSMS, LOGL_DEBUG, "Sending SMS done (loop) (%d attempted)\n",
|
||||
attempted);
|
||||
sms_free(sms);
|
||||
break;
|
||||
}
|
||||
|
@ -324,6 +330,7 @@ no_pending_sms:
|
|||
*/
|
||||
int sms_queue_trigger(struct gsm_sms_queue *smsq)
|
||||
{
|
||||
LOGP(DLSMS, LOGL_DEBUG, "Triggering SMS queue\n");
|
||||
if (osmo_timer_pending(&smsq->push_queue))
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ static int _send_sms_str(struct gsm_subscriber *receiver,
|
|||
sms_free(sms);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
LOGP(DLSMS, LOGL_DEBUG, "SMS stored in DB\n");
|
||||
|
||||
sms_free(sms);
|
||||
sms_queue_trigger(receiver->group->net->sms_queue);
|
||||
|
|
Loading…
Reference in New Issue