X-Git-Url: https://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=common%2Fdata%2Fvirtmodem.c;h=c421fd1ac1e888d762203a29779715b5c4fc31e6;hp=bcedc7e38e0abf97add6c1f1532f08d86bc876d2;hb=5fe84d523d76fc6fb98eab34d0db5501bdc982e5;hpb=e434e7467e6c831f5b00f166483764f6f7649828 diff --git a/common/data/virtmodem.c b/common/data/virtmodem.c index bcedc7e..c421fd1 100644 --- a/common/data/virtmodem.c +++ b/common/data/virtmodem.c @@ -107,11 +107,16 @@ bool VM_Initialise(char *model,char *port, char *initlength, GSM_ConnectionType return (false); } +#ifndef UCLINUX /* Create and start thread, */ return VM_ThreadLoop(); +#else + return true; +#endif } static void VM_CharHandler(void); +extern GSM_Error N6110_SendStatusRequest(void); bool VM_ThreadLoop(void) { @@ -131,13 +136,16 @@ bool VM_ThreadLoop(void) 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 */ +#if 0 + N6110_SendStatusRequest(); +#endif break; case -1: