sms: Make the amount of failures configurable as well.
diff --git a/openbsc/src/sms_queue.c b/openbsc/src/sms_queue.c
index 4bbdef8..c0056c5 100644
--- a/openbsc/src/sms_queue.c
+++ b/openbsc/src/sms_queue.c
@@ -58,6 +58,7 @@
 	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 @@
 	     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 @@
 
 	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;