r533 - trunk/src/target/gsm/src/util

laforge at gta01.hmw-consulting.de laforge at gta01.hmw-consulting.de
Wed Jan 10 13:49:20 CET 2007


Author: laforge
Date: 2007-01-10 13:49:20 +0100 (Wed, 10 Jan 2007)
New Revision: 533

Modified:
   trunk/src/target/gsm/src/util/atcmd.c
Log:
use non-blocking I/O


Modified: trunk/src/target/gsm/src/util/atcmd.c
===================================================================
--- trunk/src/target/gsm/src/util/atcmd.c	2007-01-10 12:47:01 UTC (rev 532)
+++ trunk/src/target/gsm/src/util/atcmd.c	2007-01-10 12:49:20 UTC (rev 533)
@@ -2,6 +2,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <fcntl.h>
 
 #include <libgsmd/libgsmd.h>
 
@@ -24,6 +25,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