Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 2001 17:11:10 -0800 (PST)
From:      yxiao@cisco.com
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/24942: tftp client timeout failure
Message-ID:  <200102080111.f181BA453783@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         24942
>Category:       misc
>Synopsis:       tftp client timeout failure
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 07 17:20:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Yuqing Xiao
>Release:        $FreeBSD: src/usr.bin/tftp/tftp.c,v 1.5 1999/08/28 01:06:24 peter Exp
>Organization:
Cisco Systems
>Environment:
Linux dhcp-171-70-93-24.cisco.com 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown

>Description:
Alarm clock can only fired once. Problem: SIGALRM blocked.


>How-To-Repeat:

>Fix:
change timer function:
--- tftp.c      2000/08/01 20:38:08     1.2
+++ tftp.c      2001/02/07 16:18:03
@@ -455,9 +455,15 @@
 timer(sig)
        int sig;
 {
+       sigset_t sigset;
+        int error;

+       //signal(SIGALRM, timer);
+       error = sigemptyset(&sigset);
+        error |= sigdelset(&sigset, SIGALRM);
+        error |= sigprocmask(SIG_SETMASK, &sigset, NULL);
        timeout += rexmtval;
-       if (timeout >= maxtimeout) {
+       if (timeout >= maxtimeout || error) {
                printf("Transfer timed out.\n");
                global_errno = ETIMEDOUT;
                longjmp(toplevel, -1);

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102080111.f181BA453783>