From 6b55f603e3fe49b55f15ee3895699887bca13741 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 2 Nov 2012 15:54:26 +0100 Subject: [PATCH] sms_queue: It is a bad idea to detach a subscriber on failed delivery It is a bad idea to detach a subscriber. The subscriber will not be reachable until the next periodic updating cycle. In case we have too many failed deliveries we will need to reduce the period for the LU and implement a subscriber purging task. This is a preparation for the 29C3 and a problem Jolly experience with his type writer system. --- openbsc/src/libmsc/sms_queue.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/openbsc/src/libmsc/sms_queue.c b/openbsc/src/libmsc/sms_queue.c index e685973a0..93f1a9244 100644 --- a/openbsc/src/libmsc/sms_queue.c +++ b/openbsc/src/libmsc/sms_queue.c @@ -51,8 +51,6 @@ struct gsm_sms_pending { unsigned long long sms_id; int failed_attempts; int resend; - - int no_detach; }; struct gsm_sms_queue { @@ -155,16 +153,6 @@ static void sms_pending_failed(struct gsm_sms_pending *pending, int paging_error if (++pending->failed_attempts < smsq->max_fail) return sms_pending_resend(pending); - if (paging_error && !pending->no_detach) { - LOGP(DSMS, LOGL_NOTICE, - "Subscriber %llu is not reachable. Setting LAC=0.\n", pending->subscr->id); - pending->subscr->lac = GSM_LAC_RESERVED_DETACHED; - db_sync_subscriber(pending->subscr); - - /* Workaround a failing sync */ - db_subscriber_update(pending->subscr); - } - sms_pending_free(pending); smsq->pending -= 1; sms_queue_trigger(smsq); @@ -356,7 +344,6 @@ static int sub_ready_for_sm(struct gsm_network *net, struct gsm_subscriber *subs LOGP(DMSC, LOGL_NOTICE, "Pending paging while subscriber %llu attached.\n", subscr->id); - pending->no_detach = 1; return 0; }