Fixing a bug in the server, that made the server crash if the output file was
asked on a job without output, like those resulting of ctrl-c while the client
enqueuing was blocking.
--- a/jobs.c Mon Jul 18 22:38:02 2011 +0200
+++ b/jobs.c Mon Jul 18 22:43:05 2011 +0200
@@ -880,12 +880,13 @@
m.type = ANSWER_OUTPUT;
m.u.output.store_output = p->store_output;
m.u.output.pid = p->pid;
- if (m.u.output.store_output)
+ if (m.u.output.store_output && p->output_filename)
m.u.output.ofilename_size = strlen(p->output_filename) + 1;
else
m.u.output.ofilename_size = 0;
send_msg(s, &m);
- send_bytes(s, p->output_filename, m.u.output.ofilename_size);
+ if (m.u.output.ofilename_size > 0)
+ send_bytes(s, p->output_filename, m.u.output.ofilename_size);
}
void notify_errorlevel(struct Job *p)