Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arne Øslebø
mapi
Commits
a6d5f40b
Commit
a6d5f40b
authored
Oct 25, 2005
by
Browse files
various fixes
git-svn-id:
file:///home/svn/mapi/trunk@225
8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent
846c5b07
Changes
1
Hide whitespace changes
Inline
Side-by-side
mapiipc.c
View file @
a6d5f40b
...
...
@@ -110,7 +110,9 @@ void mapiipc_remote_write_to_all(remote_flowdescr_t* rflow)
{
host_flow
*
hflow
;
flist_node_t
*
fnode
;
pthread_mutex_lock
(
&
rflow
->
mutex
);
rflow
->
pending_msgs
=
0
;
for
(
fnode
=
flist_head
(
rflow
->
host_flowlist
);
fnode
!=
NULL
;
fnode
=
flist_next
(
fnode
))
{
hflow
=
(
host_flow
*
)
fnode
->
data
;
hflow
->
dbuf
->
fd
=
hflow
->
fd
;
...
...
@@ -129,6 +131,7 @@ void *mapiipc_comm_thread(void *host) {
host_flow
*
hflow
;
int
recv_bytes
;
unsigned
int
dbuf_bytes
=
0
;
int
pending
;
dbuf
=
(
struct
dmapiipcbuf
*
)
&
buffer
[
0
];
...
...
@@ -159,16 +162,17 @@ void *mapiipc_comm_thread(void *host) {
}
pthread_mutex_lock
(
&
rflow
->
mutex
);
if
(
rflow
->
pending_msgs
>
0
)
{
pthread_mutex_lock
(
&
rflow
->
mutex
);
--
rflow
->
pending_msgs
;
pending
=
rflow
->
pending_msgs
;
pthread_mutex_unlock
(
&
rflow
->
mutex
);
if
(
rflow
->
pending
_msgs
==
0
)
{
if
(
pending
==
0
)
{
sem_post
(
&
rflow
->
fd_sem
);
}
}
else
pthread_mutex_unlock
(
&
rflow
->
mutex
);
}
else
{
printf
(
"INTERNAL SERIOUS FAILURE %d
\n
"
,
dbuf
->
fd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment