diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-05-09 21:48:53 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-09-18 23:40:06 +0200 |
commit | 1e918c3d31abcc3e88fd49ba0ad8b550bc48fed4 (patch) | |
tree | 55b9d87a5e607e925f1e4a4e1b2bf5c1b93a5ffc /openbsc | |
parent | ffaed9eed2a9342adc303bd429a136c8ea247abe (diff) |
debug log for sms: fix/add
One logged the wrong function name. Add others.
Change-Id: Ied5d8e84d5d192c826bc131be8907eaa55190479
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/libmsc/gsm_04_11.c | 6 | ||||
-rw-r--r-- | openbsc/src/libmsc/sms_queue.c | 9 | ||||
-rw-r--r-- | openbsc/src/libmsc/vty_interface_layer3.c | 1 |
3 files changed, 14 insertions, 2 deletions
diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index d1fdfb997..08d8fdfd1 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -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) { diff --git a/openbsc/src/libmsc/sms_queue.c b/openbsc/src/libmsc/sms_queue.c index 5dbe81f2f..ebc53c239 100644 --- a/openbsc/src/libmsc/sms_queue.c +++ b/openbsc/src/libmsc/sms_queue.c @@ -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; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index fd3771abf..6f0006cc9 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -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); |