ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_bittybits.C,1.4,1.5


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_bittybits.C,1.4,1.5
Date: Wed, 15 Jan 2003 03:33:19 -0500

Update of /cvsroot/ayttm/ayttm/modules/msn2/libmsn2
In directory subversions:/tmp/cvs-serv28040/modules/msn2/libmsn2

Modified Files:
        msn_bittybits.C 
Log Message:
remove alarm() hack


Index: msn_bittybits.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_bittybits.C,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- msn_bittybits.C     14 Jan 2003 15:12:13 -0000      1.4
+++ msn_bittybits.C     15 Jan 2003 08:33:16 -0000      1.5
@@ -10,16 +10,6 @@
 #include "msn_interface.h"
 #include "msn_bittybits.h"
 
-#include <errno.h>
-#include <signal.h>
-#include <setjmp.h>
-
-static sigjmp_buf jmpenv;
-static void timeout_handler(int sig)
-{
-       siglongjmp(jmpenv, 1);
-}
-
 char ** msn_read_line(int sock, int * numargs)
 {
   // Right, this is quite a task. Step One is to read the thing in.
@@ -29,28 +19,12 @@
 
   while(1)
   {
-    void (*prev_handler)(int);
-
-    alarm(0);
-    prev_handler = signal(SIGALRM, timeout_handler);
-    if (sigsetjmp(jmpenv, 1)) {
-           alarm(0);
-           signal(SIGALRM, prev_handler);
-           errno = ETIMEDOUT;
-           printf("Timeout !!!!!!!!!\n");
-           return NULL;
-    }
-    alarm(3);
-       
     if(read(sock, &c, 1)<1)
     {
       printf("What the..?!\n"); //DEBUG
       return NULL;
     }
 
-    alarm(0);
-    signal(SIGALRM, prev_handler);
-        
     if(pos == 1249) {buf[pos]='\0'; continue; }
     if(c=='\r' || pos > 1249) { continue; }
     if(c=='\n') { numspaces++; buf[pos]='\0'; break; }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]