summaryrefslogtreecommitdiff
path: root/cleopatre/application/managerd/src/managerd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/application/managerd/src/managerd.c')
-rw-r--r--cleopatre/application/managerd/src/managerd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cleopatre/application/managerd/src/managerd.c b/cleopatre/application/managerd/src/managerd.c
index 0db0e3cdbb..4944cf21b0 100644
--- a/cleopatre/application/managerd/src/managerd.c
+++ b/cleopatre/application/managerd/src/managerd.c
@@ -68,10 +68,11 @@ static int managerd_process(struct managerd_ctx *ctx)
timeout.tv_usec = 0;
FD_ZERO(&readfds);
FD_SET(ctx->sock_br, &readfds);
+ FD_SET(ctx->sock_lo, &readfds);
FD_SET (ctx->sock_mme, &readfds);
- //Select on BR connection
- result = select(ctx->sock_br + 2, &readfds, NULL, NULL, &timeout);
+ //Select
+ result = select(ctx->sock_br + 3, &readfds, NULL, NULL, &timeout);
//Select error
if(0 > result)
@@ -88,10 +89,11 @@ static int managerd_process(struct managerd_ctx *ctx)
else
continue;
}
- else if FD_ISSET (ctx->sock_br, &readfds)
+ else if (FD_ISSET (ctx->sock_br, &readfds)
+ || FD_ISSET (ctx->sock_lo, &readfds))
{
//Receive a frame from bridge: process it
- len = bridge_receive(ctx, buffer, MAX_PKT_LEN);
+ len = bridge_receive(ctx, buffer, MAX_PKT_LEN, FD_ISSET (ctx->sock_lo, &readfds) /* check for local if */);
if(0 >= len)
{
result = -1;