]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
doh
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 12 Oct 2009 23:27:01 +0000 (23:27 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 12 Oct 2009 23:27:01 +0000 (23:27 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15144 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index d3d2da3a1589e7964a4d2e7f945a0a4e8f65acb8..bd170a88e952cba49364fb99347942533e64e9bf 100644 (file)
@@ -640,11 +640,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_all_messages(switch_core_sessio
 
 SWITCH_DECLARE(switch_status_t) switch_ivr_parse_all_events(switch_core_session_t *session)
 {
+       int x = 0;
 
 
-       while (switch_ivr_parse_next_event(session) == SWITCH_STATUS_SUCCESS);
        switch_ivr_parse_all_messages(session);
-       switch_ivr_sleep(session, 0, SWITCH_TRUE, NULL);
+
+       while (switch_ivr_parse_next_event(session) == SWITCH_STATUS_SUCCESS) x++;
+
+       if (x) {
+               switch_ivr_sleep(session, 0, SWITCH_TRUE, NULL);
+       }
 
        return SWITCH_STATUS_SUCCESS;
 }