* fix potential hang on detecting an ECM block end (29 Jul 2005)
* fix job batches to properly release modems (26 Jul 2005)
* fix build error with Mac OS X 10.4 (26 Jul 2005)
-* fix sendfax crash with verbose output (25 Jul 2005)
+* fix sendfax crash with verbose output (25, 29 Jul 2005)
* fix a race with scheduled jobs to allow for coordinated
batch sending (25 Jul 2005)
* fix some error conditions with JBIG and JPEG reception (25 Jul 2005)
int
FaxClient::vcommand(const char* fmt, va_list ap)
{
+ char *line = NULL;
+
if (getVerbose()) {
if (strncasecmp("PASS ", fmt, 5) == 0) {
traceServer("-> PASS XXXX");
} else if (strncasecmp("ADMIN ", fmt, 6) == 0) {
traceServer("-> ADMIN XXXX");
} else {
- va_list ap2;
- fxStr s("-> ");
- s.append(fmt);
- va_copy(ap2, ap);
- vtraceServer(s, ap2);
- va_end(ap2);
+ line = (char *)malloc(100);
+ if (line == NULL)
+ printError("Memory allocation failed");
+ else {
+ vsnprintf(line, 100, fmt, ap);
+ traceServer("-> %s", line);
+ }
}
}
if (fdOut == NULL) {
code = -1;
return (0);
}
- vfprintf(fdOut, fmt, ap);
+ if (line == NULL)
+ vfprintf(fdOut, fmt, ap);
+ else {
+ fputs(line, fdOut);
+ free(line);
+ }
fputs("\r\n", fdOut);
(void) fflush(fdOut);
return (getReply(strncmp(fmt, "QUIT", 4) == 0));