regular status reporting disabled back again
[gnokii.git] / common / data / virtmodem.c
index 6b6d61a..c421fd1 100644 (file)
@@ -64,7 +64,6 @@ int           PtyWRFD;        /* pty interface - only different in debug mode. */
 static bool    UseSTDIO;       /* Use STDIO for debugging purposes instead of pty */
 bool   CommandMode;
 
 static bool    UseSTDIO;       /* Use STDIO for debugging purposes instead of pty */
 bool   CommandMode;
 
-static bool    VM_ThreadLoop(void);
 static GSM_Error       VM_GSMInitialise(char *model, char *port, char *initlength, GSM_ConnectionType connection, char *synchronizetime);
 static int             VM_PtySetup(char *bindir);
 
 static GSM_Error       VM_GSMInitialise(char *model, char *port, char *initlength, GSM_ConnectionType connection, char *synchronizetime);
 static int             VM_PtySetup(char *bindir);
 
@@ -108,13 +107,18 @@ bool VM_Initialise(char *model,char *port, char *initlength, GSM_ConnectionType
                return (false);
        }
 
                return (false);
        }
 
+#ifndef UCLINUX
        /* Create and start thread, */
        return VM_ThreadLoop();
        /* Create and start thread, */
        return VM_ThreadLoop();
+#else
+       return true;
+#endif
 }
 
 static void    VM_CharHandler(void);
 }
 
 static void    VM_CharHandler(void);
+extern GSM_Error N6110_SendStatusRequest(void);
 
 
-static bool VM_ThreadLoop(void)
+bool VM_ThreadLoop(void)
 {
        int res;
        fd_set readfds;
 {
        int res;
        fd_set readfds;
@@ -132,13 +136,16 @@ static bool VM_ThreadLoop(void)
 
                FD_ZERO(&readfds);
                FD_SET(PtyRDFD,&readfds);
 
                FD_ZERO(&readfds);
                FD_SET(PtyRDFD,&readfds);
-               timeout.tv_sec=0;
-               timeout.tv_usec=500*1000;
+               timeout.tv_sec=2;
+               timeout.tv_usec=0;/*500*1000;*/
 
                res = select(PtyRDFD+1,&readfds,NULL/*writefds*/,NULL/*exceptfds*/,&timeout);
 
                switch (res) {
                        case 0: /* Timeout */
 
                res = select(PtyRDFD+1,&readfds,NULL/*writefds*/,NULL/*exceptfds*/,&timeout);
 
                switch (res) {
                        case 0: /* Timeout */
+#if 0
+                               N6110_SendStatusRequest();
+#endif
                                break;
 
                        case -1:
                                break;
 
                        case -1: