* sendto_kdc.c: Sockets must be closed with closesocket() instead
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 27 Oct 2003 19:59:22 +0000 (19:59 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 27 Oct 2003 19:59:22 +0000 (19:59 +0000)
      of close() for proper socket deallocation on systems which do
      not use file descriptors for sockets.  i.e., Windows.

ticket: 1973
target_version: 1.3.2
tags: pullup
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15844 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/sendto_kdc.c

index e0bc0cd901880f1e9b026a5fe5fb7eff21704f06..017b9ae7e6d6e400783d0c9d948dc57c23add4ae 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-27  Jeffrey Altman <jaltman@mit.edu>
+
+    * sendto_kdc.c: sockets must be closed with closesocket() and 
+      and not close() in order to ensure portability among different
+      operating systems.
+
 2003-08-21  Ken Raeburn  <raeburn@mit.edu>
 
        * dnssrv.c: New file; split out DNS SRV RR query support...
index 0f5b9f275d52652e52bc0f6472b75e7919f21d08..8e0f719a470a3e11c68599d494e519cef0497e97 100644 (file)
@@ -1073,7 +1073,7 @@ krb5int_sendto (krb5_context context, const krb5_data *message,
 egress:
     for (i = 0; i < n_conns; i++) {
        if (conns[i].fd != INVALID_SOCKET)
-           close(conns[i].fd);
+           closesocket(conns[i].fd);
        if (conns[i].state == READING
            && conns[i].x.in.buf != 0
            && conns[i].x.in.buf != udpbuf)