--- cups-1.2.2/backend/snmp.c.try_connect 2006-08-01 13:24:43.000000000 +0100 +++ cups-1.2.2/backend/snmp.c 2006-08-02 16:58:56.000000000 +0100 @@ -1692,7 +1692,8 @@ debug_printf("DEBUG: %.3f Probing %s...\n", run_time(), device->addrname); - if ((http = httpConnect(device->addrname, 631)) != NULL) + if (!try_connect(&(device->address), device->addrname, 631) && + (http = httpConnect(device->addrname, 631)) != NULL) { /* * IPP is supported... @@ -2320,6 +2321,7 @@ { int fd; /* Socket */ int status; /* Connection status */ + struct sigaction act; debug_printf("DEBUG: %.3f Trying %s://%s:%d...\n", run_time(), @@ -2333,7 +2335,10 @@ addr->ipv4.sin_port = htons(port); - signal(SIGALRM, alarm_handler); + act.sa_handler = alarm_handler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGALRM, &act, NULL); alarm(1); status = connect(fd, (void *)addr, httpAddrLength(addr));