Module Name:    src
Committed By:   plunky
Date:           Mon Oct 18 20:43:24 UTC 2010

Modified Files:
        src/usr.sbin/sdpd: server.c

Log Message:
move debug output before the loop, which possibly changes the value of fd


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sdpd/server.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sdpd/server.c
diff -u src/usr.sbin/sdpd/server.c:1.8 src/usr.sbin/sdpd/server.c:1.9
--- src/usr.sbin/sdpd/server.c:1.8	Sun Mar  7 10:58:40 2010
+++ src/usr.sbin/sdpd/server.c	Mon Oct 18 20:43:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.8 2010/03/07 10:58:40 plunky Exp $	*/
+/*	$NetBSD: server.c,v 1.9 2010/10/18 20:43:23 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: server.c,v 1.8 2010/03/07 10:58:40 plunky Exp $");
+__RCSID("$NetBSD: server.c,v 1.9 2010/10/18 20:43:23 plunky Exp $");
 
 #include <sys/select.h>
 #include <sys/stat.h>
@@ -564,14 +564,14 @@
 	FD_CLR(fd, &srv->fdset);
 	srv->fdidx[fd].valid = false;
 
+	log_debug("client on fd#%d closed", fd);
+
 	if (fd == srv->fdmax) {
 		while (fd > 0 && !srv->fdidx[fd].valid)
 			fd--;
 
 		srv->fdmax = fd;
 	}
-
-	log_debug("client on fd#%d closed", fd);
 }
 
 /*

Reply via email to