diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-11-30 22:08:26 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-11-30 22:08:26 +0100 |
commit | bb88e80675820e01e17028b061eb11ae7a63d55c (patch) | |
tree | bf6647077c195a91fbc3ead976f97d4e33fb96bc /src/coordinator.c | |
parent | 262da2492d77f2a6feab3a99a725dbddf6d16188 (diff) | |
download | biruda-bb88e80675820e01e17028b061eb11ae7a63d55c.tar.gz biruda-bb88e80675820e01e17028b061eb11ae7a63d55c.tar.bz2 |
playing with glib main loop and events
Diffstat (limited to 'src/coordinator.c')
-rw-r--r-- | src/coordinator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/coordinator.c b/src/coordinator.c index d65060d..fec3906 100644 --- a/src/coordinator.c +++ b/src/coordinator.c @@ -173,6 +173,10 @@ static void *coordinator_func( void *thread_data ) printf( "coordinator idle: %d\n", coordinator_must_terminate ); char *answer = NULL; + // TODO: nn_recv should be called with NN_DONTWAIT, + // but only if the main loop of gmail says no events are + // pending. We have to handle exit clients, out and error + // pipes here.. int bytes = nn_recv( coordinator_sock, &answer, NN_MSG, 0 ); if( coordinator_must_terminate ) continue; if( bytes >= 0 ) { |