keith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/41222?usp=email )


Change subject: sqlite optimisation: add debug logging
......................................................................

sqlite optimisation: add debug logging

Change-Id: I43fc4d0e8c4de1f3d353a6bc886b4c3761dcef2a
---
M src/libmsc/sms_queue.c
1 file changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/22/41222/1

diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c
index 4ef4601..86a0e39 100644
--- a/src/libmsc/sms_queue.c
+++ b/src/libmsc/sms_queue.c
@@ -301,11 +301,13 @@
        while (wrapped < 2 && (--sanity)) {
                /* If we wrapped around and passed the first msisdn, we're
                 * through the entire SMS DB; end it. */
-               if (wrapped && strcmp(last_msisdn, started_with_msisdn) >= 0)
+               if (wrapped && strcmp(last_msisdn, started_with_msisdn) >= 0) {
+                       DEBUGP(DLSMS, "SMS queue: Reached end of DB.\n");
                        break;
-
+               }
                sms = db_sms_get_next_unsent_rr_msisdn(net, last_msisdn, 9);
                if (!sms) {
+                       DEBUGP(DLSMS, "SMS queue: Got no next unsent SMS\n");
                        last_msisdn[0] = '\0';
                        wrapped++;
                        continue;
@@ -324,7 +326,7 @@
                return sms;
        }

-       DEBUGP(DLSMS, "SMS queue: no SMS to be sent\n");
+       DEBUGP(DLSMS, "SMS queue: no SMS to be sent, tried %d times.\n", 
sanity+100);
        return NULL;
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/41222?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I43fc4d0e8c4de1f3d353a6bc886b4c3761dcef2a
Gerrit-Change-Number: 41222
Gerrit-PatchSet: 1
Gerrit-Owner: keith <[email protected]>

Reply via email to