Changeset 2925


Ignore:
Timestamp:
Dec 30, 2006, 5:03:06 AM (19 years ago)
Author:
bird
Message:

cleanup in progress (late night session)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/src/libsocket/soclose.c

    r2739 r2925  
    3232#include <sys/socket.h>
    3333#include <sys/fcntl.h>
    34 #include <emx/io.h>
     34#include <klibc/backend.h>
    3535#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_SOCKET
    36 #include <InnoTekLIBC/logstrict.h>
     36#include <klibc/logstrict.h>
    3737#include "socket.h"
    3838
     
    4040{
    4141    LIBCLOG_ENTER("socket=%d\n", socket);
    42     PLIBCSOCKETFH pFHSocket = __libc_TcpipFH(socket);
    43     if (pFHSocket)
    44     {
    45         int rc = __libc_FHClose(socket)
    46         if (!rc)
    47             LIBCLOG_RETURN_INT(0);
    48         /* Convert EBADF to ENOTSOCK (although this normally won't happen). */
    49         if (rc == -EBADF)
    50             rc = -ENOTSOCK;
    51         __libc_TcpipSetErrno(-rc);
    52     }
    53 
     42    int rc = __libc_Back_ioClose(socket);
     43    if (!rc)
     44        LIBCLOG_RETURN_INT(0);
     45    /* Convert EBADF to ENOTSOCK (although this normally won't happen). */
     46    if (rc == -EBADF)
     47        rc = -ENOTSOCK;
     48    __libc_TcpipSetErrno(-rc);
    5449    LIBCLOG_RETURN_INT(-1);
    5550}
Note: See TracChangeset for help on using the changeset viewer.