projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f233243
)
Fix sockpool. The current version would trash the linked list if getSock2WithLock...
author
bdemsky
<bdemsky>
Fri, 1 Aug 2008 19:11:21 +0000
(19:11 +0000)
committer
bdemsky
<bdemsky>
Fri, 1 Aug 2008 19:11:21 +0000
(19:11 +0000)
Robust/src/Runtime/DSTM/interface/sockpool.c
patch
|
blob
|
history
diff --git
a/Robust/src/Runtime/DSTM/interface/sockpool.c
b/Robust/src/Runtime/DSTM/interface/sockpool.c
index 27d2e953f42f163acaaaaf28d9844f3245dd8b23..f03631de447ef631bde7cd7c8f94bba2b2656dad 100644
(file)
--- a/
Robust/src/Runtime/DSTM/interface/sockpool.c
+++ b/
Robust/src/Runtime/DSTM/interface/sockpool.c
@@
-178,10
+178,10
@@
int getSock2WithLock(sockPoolHashTable_t *sockhash, unsigned int mid) {
}
UnLock(&sockhash->mylock);
if((sd = createNewSocket(mid)) != -1) {
-
*ptr=
calloc(1, sizeof(socknode_t));
-
(*ptr)->mid=mi
d;
-
(*ptr)->sd=s
d;
-
//insToListWithLock(sockhash, *ptr
);
+
socknode_t *inusenode =
calloc(1, sizeof(socknode_t));
+
inusenode->sd = s
d;
+
inusenode->mid = mi
d;
+
insToListWithLock(sockhash, inusenode
);
return sd;
} else {
return -1;