]> git.saurik.com Git - apt.git/commitdiff
Minor fixes on racy_pselect
authorOtavio Salvador <otavio@ossystems.com.br>
Wed, 31 Oct 2007 15:36:54 +0000 (13:36 -0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Wed, 31 Oct 2007 15:36:54 +0000 (13:36 -0200)
apt-pkg/deb/dpkgpm.cc

index e3fe8d845a1e1bcb7cfdb108964a44db034d5231..5a7711a90e88b9f9c74f92815b3ff23c863d22e7 100644 (file)
@@ -555,10 +555,10 @@ static int racy_pselect(int nfds, fd_set *readfds, fd_set *writefds,
    struct timeval tv;
    int retval;
 
    struct timeval tv;
    int retval;
 
-   tv.tv_sec = timeout->tv.tv_sec;
-   tv.tv_usec = timeout->tv.tv_nsec/1000;
+   tv.tv_sec = timeout->tv_sec;
+   tv.tv_usec = timeout->tv_nsec/1000;
 
 
-   sigprocmask(SIG_SETMASK, &sigmask, &origmask);
+   sigprocmask(SIG_SETMASK, sigmask, &origmask);
    retval = select(nfds, readfds, writefds, exceptfds, &tv);
    sigprocmask(SIG_SETMASK, &origmask, 0);
    return retval;
    retval = select(nfds, readfds, writefds, exceptfds, &tv);
    sigprocmask(SIG_SETMASK, &origmask, 0);
    return retval;