Skip to content
Snippets Groups Projects
Commit c2232dc7 authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Ok, sattach is showing standard IO now (for real this time).

Need to make port numbers be in host byte order by default so that this
confusion doesn't happen again.
parent 878ccb75
No related branches found
No related tags found
No related merge requests found
......@@ -1195,11 +1195,13 @@ client_io_handler_create(slurm_step_io_fds_t fds,
for (i = 0; i < cio->num_listen; i++) {
eio_obj_t *obj;
short port;
if (net_stream_listen(&cio->listensock[i],
(short *)&cio->listenport[i]) < 0) {
&port) < 0) {
fatal("unable to initialize stdio listen socket: %m");
}
cio->listenport[i] = ntohs(port);
debug("initialized stdio listening socket, port %d\n",
ntohs(cio->listenport[i]));
/*net_set_low_water(cio->listensock[i], 140);*/
......
......@@ -228,7 +228,7 @@ int slurm_step_launch (slurm_step_ctx ctx,
launch.io_port = xmalloc(sizeof(uint16_t) * launch.num_io_port);
for (i = 0; i < launch.num_io_port; i++) {
launch.io_port[i] =
ntohs(ctx->launch_state->client_io->listenport[i]);
ctx->launch_state->client_io->listenport[i];
}
launch.num_resp_port = ctx->launch_state->num_resp_port;
......
......@@ -197,7 +197,7 @@ launch(void *arg)
r.num_io_port = job->client_io->num_listen;
r.io_port = xmalloc(sizeof(uint16_t) * r.num_io_port);
for (i = 0; i < r.num_io_port; i++) {
r.io_port[i] = ntohs(job->client_io->listenport[i]);
r.io_port[i] = job->client_io->listenport[i];
}
msg_array_ptr[0].msg_type = REQUEST_LAUNCH_TASKS;
......
......@@ -333,8 +333,8 @@ _attach_to_job(srun_job_t *job)
r->job_step_id = job->stepid;
r->num_io_port = 1;
r->io_port = (uint16_t *)xmalloc(sizeof(uint16_t));
r->io_port[0] = ntohs(job->client_io->listenport[
i%job->client_io->num_listen]);
r->io_port[0] = job->client_io->listenport[
i%job->client_io->num_listen];
r->num_resp_port = 1;
r->resp_port = (uint16_t *)xmalloc(sizeof(uint16_t));
r->resp_port[0] = ntohs(job->jaddr[i%job->njfds].sin_port);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment