projects
/
swifty.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c670c3c
)
raw: Add list_remove_socket function.
author
Razvan Deaconescu
<razvan.deaconescu@cs.pub.ro>
Sat, 21 May 2011 10:02:58 +0000
(13:02 +0300)
committer
Razvan Deaconescu
<razvan.deaconescu@cs.pub.ro>
Sat, 21 May 2011 10:28:19 +0000
(13:28 +0300)
src/raw/swift_raw.c
patch
|
blob
|
history
diff --git
a/src/raw/swift_raw.c
b/src/raw/swift_raw.c
index
116e02f
..
6796854
100644
(file)
--- a/
src/raw/swift_raw.c
+++ b/
src/raw/swift_raw.c
@@
-113,10
+113,6
@@
static struct sock_list *list_elem_from_address(__CONST_SOCKADDR_ARG addr)
return NULL;
}
return NULL;
}
-/*
- * Remove socket from list. Called by sw_close "syscall".
- */
-
static struct sock_list *list_unlink_socket(int s)
{
struct sock_list *ptr;
static struct sock_list *list_unlink_socket(int s)
{
struct sock_list *ptr;
@@
-133,6
+129,23
@@
static struct sock_list *list_unlink_socket(int s)
return NULL;
}
return NULL;
}
+/*
+ * Remove socket from list. Called by sw_close "syscall".
+ */
+
+static int list_remove_socket(int s)
+{
+ struct sock_list *ptr;
+
+ ptr = list_unlink_socket(s);
+ if (ptr == NULL)
+ return -1;
+
+ free(ptr);
+ return 0;
+}
+
+
/*
* Create a new socket of type TYPE in domain DOMAIN, using
* protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically.
/*
* Create a new socket of type TYPE in domain DOMAIN, using
* protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically.