--- gw/dlr_sdb.c	2009-10-22 02:10:51.000000000 +0300
+++ gw/dlr_sdb.c	2009-10-22 02:04:48.000000000 +0300
@@ -93,7 +93,7 @@
 static long sdb_conn_type = SDB_OTHER;
 
 
-static const char* sdb_get_limit_str()
+const char* sdb_get_limit_str()
 {
     switch (sdb_conn_type) {
         case SDB_ORACLE:
@@ -157,6 +157,8 @@
     state = gw_sdb_query(octstr_get_cstr(sql), NULL, NULL);
     if (state == -1)
         error(0, "SDB: error in inserting DLR for DST <%s>", octstr_get_cstr(dlr->destination));
+    else if (!state)
+        warning(0, "SDB: No dlr inserted for DST <%s>", octstr_get_cstr(dlr->destination));
 
     octstr_destroy(sql);
     dlr_entry_destroy(dlr);
@@ -266,9 +268,10 @@
 
     state = gw_sdb_query(octstr_get_cstr(sql), NULL, NULL);
     octstr_destroy(sql);
-    if (state == -1) {
+    if (state == -1)
         error(0, "SDB: error in updating DLR");
-    }
+    else if (!state)
+        warning(0, "SDB: No dlr to update for DST<%s> (status %d)", octstr_get_cstr(dst), status);
 }
 
 static void  dlr_sdb_remove(const Octstr *smsc, const Octstr *ts, const Octstr *dst)
@@ -306,6 +309,8 @@
     octstr_destroy(sql);
     if (state == -1)
         error(0, "SDB: error in deleting DLR");
+    else if (!state)
+        warning(0, "SDB: No dlr deleted for DST<%s>", octstr_get_cstr(dst));
 }
 
 static long dlr_sdb_messages(void)
