}
const fxStr&
-faxQueueApp::pickCmd(const FaxRequest& req)
+faxQueueApp::pickCmd(const fxStr& jobtype)
{
- if (req.jobtype == "pager")
+ if (jobtype == "pager")
return (sendPageCmd);
- if (req.jobtype == "uucp")
+ if (jobtype == "uucp")
return (sendUUCPCmd);
return (sendFaxCmd); // XXX gotta return something
}
{
job.start = Sys::now(); // start of transmission
// XXX start deadman timeout on active jobs
- const fxStr& cmd = pickCmd(*req);
+ const fxStr& cmd = pickCmd(req->jobtype);
fxStr dargs(job.getJCI().getArgs());
pid_t pid = fork();
switch (pid) {
logError("JOB %s: %s", (const char*)job.jobid, (const char*) req->notice);
} else if ((status >>= 8) == 127) {
req->notice = "Send program terminated abnormally; unable to exec " |
- pickCmd(*req);
+ pickCmd(req->jobtype);
req->status = send_failed;
logError("JOB %s: %s",
(const char*)job.jobid, (const char*)req->notice);
// miscellaneous stuff
void startTimeout(long ms);
void stopTimeout(const char* whichdir);
- const fxStr& pickCmd(const FaxRequest& req);
+ const fxStr& pickCmd(const fxStr& jobtype);
// FIFO-related stuff
void childStatus(pid_t, int); // Dispatcher hook
int inputReady(int); // Dispatcher hook