aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/sms_queue.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-25 14:46:54 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-12-26 09:40:03 +0100
commit7e59c83d66a7deac3371d62a779a3544dfb1524e (patch)
treedc443d9a246c4550abe1768528606ff32bba33de /openbsc/src/sms_queue.c
parent4dcc5e5f8ad37bfb6f9288ce4bc58fcc3622ebe5 (diff)
sms: Make the amount of failures configurable as well.
Diffstat (limited to 'openbsc/src/sms_queue.c')
-rw-r--r--openbsc/src/sms_queue.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/sms_queue.c b/openbsc/src/sms_queue.c
index 4bbdef88c..c0056c560 100644
--- a/openbsc/src/sms_queue.c
+++ b/openbsc/src/sms_queue.c
@@ -58,6 +58,7 @@ struct gsm_sms_queue {
struct timer_list resend_pending;
struct timer_list push_queue;
struct gsm_network *network;
+ int max_fail;
int max_pending;
int pending;
@@ -143,7 +144,7 @@ static void sms_pending_failed(struct gsm_sms_pending *pending, int paging_error
pending->sms_id, pending->failed_attempts);
smsq = pending->subscr->net->sms_queue;
- if (++pending->failed_attempts < 3)
+ if (++pending->failed_attempts < smsq->max_fail)
return sms_pending_resend(pending);
if (paging_error) {
@@ -270,6 +271,7 @@ int sms_queue_start(struct gsm_network *network, int max_pending)
network->sms_queue = sms;
INIT_LLIST_HEAD(&sms->pending_sms);
+ sms->max_fail = 3;
sms->network = network;
sms->max_pending = max_pending;
sms->push_queue.data = sms;