svn rev #22442: branches/krb5-1-6/src/lib/krb5/os/

tlyu@MIT.EDU tlyu at MIT.EDU
Thu Jul 16 17:52:31 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22442
Commit By: tlyu
Log Message:
ticket: 6433
version_fixed: 1.6.4
status: resolved

pull up r20479 from trunk.  The ticket numbers don't match because
reported on the 1.6 branch.

 ------------------------------------------------------------------------
 r20479 | raeburn | 2008-06-26 20:31:59 -0400 (Thu, 26 Jun 2008) | 8 lines

 ticket: 5925
 status: open

 Don't do FD_SETSIZE check on Windows.
 Also, for form's sake, use closesocket instead of close inside the check.

 Kevin or Jeff, could you please verify that the code works again?


Changed Files:
U   branches/krb5-1-6/src/lib/krb5/os/sendto_kdc.c
Modified: branches/krb5-1-6/src/lib/krb5/os/sendto_kdc.c
===================================================================
--- branches/krb5-1-6/src/lib/krb5/os/sendto_kdc.c	2009-07-14 01:56:47 UTC (rev 22441)
+++ branches/krb5-1-6/src/lib/krb5/os/sendto_kdc.c	2009-07-16 21:52:30 UTC (rev 22442)
@@ -654,12 +654,14 @@
 	dprint("socket: %m creating with af %d\n", state->err, ai->ai_family);
 	return -1;		/* try other hosts */
     }
+#ifndef _WIN32 /* On Windows FD_SETSIZE is a count, not a max value.  */
     if (fd >= FD_SETSIZE) {
-	close(fd);
+	closesocket(fd);
 	state->err = EMFILE;
 	dprint("socket: fd %d too high\n", fd);
 	return -1;
     }
+#endif
     /* Make it non-blocking.  */
     if (ai->ai_socktype == SOCK_STREAM) {
 	static const int one = 1;




More information about the cvs-krb5 mailing list