source: trunk/src/emx/src/libsocket/so_cancel.c@ 1173

Last change on this file since 1173 was 1173, checked in by bird, 22 years ago

Initial logging stuff.

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1/* $Id: so_cancel.c 1173 2004-02-04 22:37:02Z bird $ */
2/** @file
3 *
4 * so_cancel().
5 *
6 * Copyright (c) 2003 knut st. osmundsen <[email protected]>
7 *
8 *
9 * This file is part of Innotek LIBC.
10 *
11 * Innotek LIBC is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published
13 * by the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * Innotek LIBC is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with Innotek LIBC; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 *
25 */
26
27/*******************************************************************************
28* Header Files *
29*******************************************************************************/
30#include "libc-alias.h"
31#include <errno.h>
32#include <sys/socket.h>
33#include <sys/fcntl.h>
34#include <emx/io.h>
35#include <emx/libclog.h>
36#include "socket.h"
37
38int so_cancel(int socket)
39{
40 LIBCLOG_ENTER("socket=%d\n", socket);
41 PLIBCSOCKETFH pFHSocket = __libsocket_FH(socket);
42 if (pFHSocket)
43 {
44 int rc;
45 rc = __libsocket_so_cancel(pFHSocket->iSocket);
46 if (rc >= 0)
47 LIBCLOG_RETURN_INT(rc);
48 __libsocket_setLibcErrno();
49 }
50
51 LIBCLOG_RETURN_INT(-1);
52}
53
54
Note: See TracBrowser for help on using the repository browser.