Commit 73903a72 by Marcus Winter

fixed cpplint warnings

parent eb8a25a6
......@@ -279,7 +279,8 @@ static mtapi_task_hndl_t embb_mtapi_task_start(
/* schedule local task */
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 &
embb_mtapi_scheduler_schedule_task(scheduler, task, kk);
}
......
......@@ -583,36 +583,41 @@ mtapi_action_hndl_t mtapi_network_action_create(
mtapi_action_hndl_t action_hndl = { 0, 0 };
int err;
// TODO: check action for allocation failure
action->domain_id = domain_id;
action->job_id = remote_job_id;
embb_mtapi_network_buffer_initialize(
&action->send_buffer, plugin->buffer_size);
embb_mutex_init(&action->send_mutex, 0);
action->host = host;
action->port = port;
embb_mtapi_network_socket_initialize(&action->socket);
err = embb_mtapi_network_socket_connect(&action->socket, host, port);
if (0 != err) {
// store socket for select
plugin->sockets[plugin->socket_count] = action->socket;
plugin->socket_count++;
action_hndl = mtapi_ext_plugin_action_create(
local_job_id,
network_task_start,
network_task_cancel,
network_action_finalize,
action,
NULL, 0, // no node local data obviously
MTAPI_NULL,
&local_status);
mtapi_status_set(status, local_status);
if (NULL != action) {
action->domain_id = domain_id;
action->job_id = remote_job_id;
embb_mtapi_network_buffer_initialize(
&action->send_buffer, plugin->buffer_size);
embb_mutex_init(&action->send_mutex, 0);
action->host = host;
action->port = port;
embb_mtapi_network_socket_initialize(&action->socket);
err = embb_mtapi_network_socket_connect(&action->socket, host, port);
if (0 != err) {
// store socket for select
plugin->sockets[plugin->socket_count] = action->socket;
plugin->socket_count++;
action_hndl = mtapi_ext_plugin_action_create(
local_job_id,
network_task_start,
network_task_cancel,
network_action_finalize,
action,
NULL, 0, // no node local data obviously
MTAPI_NULL,
&local_status);
} else {
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;
}
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