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)
{
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:
/* search for an unused pty */
for (i=0; i<16 && master <= 0; i++) {
for (j=0; j<16 && master <= 0; j++) {
- (*name)[8] = "pqrstuvwxyzPQRST"[i];
- (*name)[9] = "0123456789abcdef"[j];
+static const char *ptyp8="pqrstuvwxyzPQRST";
+static const char *ptyp9="0123456789abcdef";
+
+ (*name)[8] = ptyp8[i];
+ (*name)[9] = ptyp9[j];
/* open the master pty */
if ((master = open(*name, O_RDWR | O_NOCTTY | O_NONBLOCK )) < 0) {
if (errno == ENOENT) {