diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-12-05 15:18:48 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-12-05 15:18:48 +0100 |
commit | 67ba87a159fb55196092e59c041af6d69ce07e75 (patch) | |
tree | 10a37a3338647dce6c83a474b2ed4eb10612c91c /src/coordinator.c | |
parent | 7dae7024079fd2c3bec178cd92f47ac993119176 (diff) | |
download | biruda-67ba87a159fb55196092e59c041af6d69ce07e75.tar.gz biruda-67ba87a159fb55196092e59c041af6d69ce07e75.tar.bz2 |
added output message for worker output sent to master, master prints only debug message for now
Diffstat (limited to 'src/coordinator.c')
-rw-r--r-- | src/coordinator.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/coordinator.c b/src/coordinator.c index 1366d88..b1412e0 100644 --- a/src/coordinator.c +++ b/src/coordinator.c @@ -235,10 +235,6 @@ 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 ) { @@ -410,7 +406,8 @@ int coordinator_free( ) return 0; } -int coordinator_add_worker( const char *name, worker_execution_mode_t mode, const char *command ) +int coordinator_add_worker( const char *name, worker_execution_mode_t mode, const char *command, + const char *control, const char *data ) { if( nof_workers >= MAX_WORKERS ) { fprintf( stderr, "Can't define more workers, limit reached!\n" ); @@ -428,6 +425,9 @@ int coordinator_add_worker( const char *name, worker_execution_mode_t mode, cons w->state = WORKER_STATE_STOPPED; w->execution_data = NULL; + w->control = control; + w->data = data; + nof_workers++; return 0; |