Commit 73903a72 by Marcus Winter

fixed cpplint warnings

parent eb8a25a6
...@@ -279,7 +279,8 @@ static mtapi_task_hndl_t embb_mtapi_task_start( ...@@ -279,7 +279,8 @@ static mtapi_task_hndl_t embb_mtapi_task_start(
/* schedule local task */ /* schedule local task */
was_scheduled = MTAPI_TRUE; was_scheduled = MTAPI_TRUE;
for (mtapi_uint_t kk = 0; kk < task->attributes.num_instances; kk++) { for (mtapi_uint_t kk = 0; kk < task->attributes.num_instances;
kk++) {
was_scheduled = was_scheduled & was_scheduled = was_scheduled &
embb_mtapi_scheduler_schedule_task(scheduler, task, kk); embb_mtapi_scheduler_schedule_task(scheduler, task, kk);
} }
......
...@@ -583,36 +583,41 @@ mtapi_action_hndl_t mtapi_network_action_create( ...@@ -583,36 +583,41 @@ mtapi_action_hndl_t mtapi_network_action_create(
mtapi_action_hndl_t action_hndl = { 0, 0 }; mtapi_action_hndl_t action_hndl = { 0, 0 };
int err; int err;
// TODO: check action for allocation failure if (NULL != action) {
action->domain_id = domain_id; action->domain_id = domain_id;
action->job_id = remote_job_id; action->job_id = remote_job_id;
embb_mtapi_network_buffer_initialize( embb_mtapi_network_buffer_initialize(
&action->send_buffer, plugin->buffer_size); &action->send_buffer, plugin->buffer_size);
embb_mutex_init(&action->send_mutex, 0); embb_mutex_init(&action->send_mutex, 0);
action->host = host; action->host = host;
action->port = port; action->port = port;
embb_mtapi_network_socket_initialize(&action->socket); embb_mtapi_network_socket_initialize(&action->socket);
err = embb_mtapi_network_socket_connect(&action->socket, host, port); err = embb_mtapi_network_socket_connect(&action->socket, host, port);
if (0 != err) { if (0 != err) {
// store socket for select // store socket for select
plugin->sockets[plugin->socket_count] = action->socket; plugin->sockets[plugin->socket_count] = action->socket;
plugin->socket_count++; plugin->socket_count++;
action_hndl = mtapi_ext_plugin_action_create( action_hndl = mtapi_ext_plugin_action_create(
local_job_id, local_job_id,
network_task_start, network_task_start,
network_task_cancel, network_task_cancel,
network_action_finalize, network_action_finalize,
action, action,
NULL, 0, // no node local data obviously NULL, 0, // no node local data obviously
MTAPI_NULL, MTAPI_NULL,
&local_status); &local_status);
} else {
mtapi_status_set(status, local_status); embb_mutex_destroy(&action->send_mutex);
embb_mtapi_network_buffer_finalize(&action->send_buffer);
embb_mtapi_network_socket_finalize(&action->socket);
embb_free(action);
}
} }
mtapi_status_set(status, local_status);
return action_hndl; return action_hndl;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment