r532 - trunk/src/target/gsm/src/util
laforge at gta01.hmw-consulting.de
laforge at gta01.hmw-consulting.de
Wed Jan 10 13:47:01 CET 2007
Author: laforge
Date: 2007-01-10 13:47:01 +0100 (Wed, 10 Jan 2007)
New Revision: 532
Modified:
trunk/src/target/gsm/src/util/shell.c
Log:
use non-blocking i/o to prevent missing of events
Modified: trunk/src/target/gsm/src/util/shell.c
===================================================================
--- trunk/src/target/gsm/src/util/shell.c 2007-01-10 12:46:45 UTC (rev 531)
+++ trunk/src/target/gsm/src/util/shell.c 2007-01-10 12:47:01 UTC (rev 532)
@@ -2,6 +2,7 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
+#include <fcntl.h>
#include <libgsmd/libgsmd.h>
#include <libgsmd/voicecall.h>
@@ -37,6 +38,9 @@
lgsm_register_handler(lgsmh, GSMD_MSG_PASSTHROUGH, &pt_msghandler);
+ fcntl(0, F_SETFD, O_NONBLOCK);
+ fcntl(lgsm_fd(lgsmh), F_SETFD, O_NONBLOCK);
+
FD_ZERO(&readset);
while (1) {
More information about the commitlog
mailing list