bool
FaxClient::jobParm(const char* name, const fxStr& value)
{
+ /*
+ * We need to quote any " marks in the string before
+ * we pass it on to the raw jobParm(... const char*)
+ */
+ if (value.next(0,'"'))
+ {
+ fxStr tmp(value);
+ int r = tmp.length();
+ while (r > 0)
+ {
+ if ( (r = tmp.nextR(r-1, '"') ) > 0 )
+ tmp.insert('\\', r-1);
+ }
+ return jobParm(name, (const char*)tmp);
+ }
return jobParm(name, (const char*) value);
}
bool
FaxClient::jobParm(const char* name, const char* value)
{
+ /*
+ * if they're passing us a wrong char*, we expect
+ * them to have handled any quoting requried.
+ */
return (command("JPARM %s \"%s\"", name, value) == COMPLETE);
}