add some warning message for when chan_sip gets overloaded (issue #5530)
authorKevin P. Fleming <kpfleming@digium.com>
Mon, 31 Oct 2005 22:18:36 +0000 (22:18 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Mon, 31 Oct 2005 22:18:36 +0000 (22:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6908 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 22d07e0..e767d0a 100755 (executable)
@@ -11199,9 +11199,14 @@ restartsearch:
                if (fastrestart)
                        res = 1;
                res = ast_io_wait(io, res);
+               if (res > 20)
+                       ast_log(LOG_WARNING, "chan_sip: ast_io_wait ran %d all at once\n", res);
                ast_mutex_lock(&monlock);
-               if (res >= 0) 
-                       ast_sched_runq(sched);
+               if (res >= 0)  {
+                       res = ast_sched_runq(sched);
+                       if (res >= 20)
+                               ast_log(LOG_WARNING, "chan_sip: ast_sched_runq ran %d all at once\n", res);
+               }
 
                /* needs work to send mwi to realtime peers */
                time(&t);