]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
skip call to read where there is no data present
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 10 Sep 2009 23:00:16 +0000 (23:00 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 10 Sep 2009 23:00:16 +0000 (23:00 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14813 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_console.c

index 5a071a18f19081fc1cfceff48151da315083ca56..547530643beb9fe1ce6566956d2a10309f9a9e40 100644 (file)
@@ -878,6 +878,14 @@ SWITCH_DECLARE(void) switch_console_loop(void)
                        break;
                }
 
+               if (FD_ISSET(fileno(stdin), &efds)) {
+                       continue;
+               }
+               
+               if (!FD_ISSET(fileno(stdin), &rfds)) {
+                       activity = 0;
+               }
+
                if (activity == 0) {
                        fflush(stdout);
                        continue;