DEBUG_printf(("cupsSideChannelRead(command=%p, status=%p, data=%p, "
- "datalen=%p(%d), timeout=%.3f)\n", command, status, data,
+ "datalen=%p(%d), timeout=%.3f)", command, status, data,
datalen, datalen ? *datalen : -1, timeout));
/*
{
if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, NULL) < 1)
{
- DEBUG_printf(("cupsSideChannelRead: Select error: %s\n", strerror(errno)));
+ DEBUG_printf(("1cupsSideChannelRead: Select error: %s", strerror(errno)));
return (-1);
}
}
if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, &stimeout) < 1)
{
- DEBUG_puts("cupsSideChannelRead: Select timeout");
+ DEBUG_puts("1cupsSideChannelRead: Select timeout");
return (-1);
}
}
while ((bytes = read(CUPS_SC_FD, buffer, sizeof(buffer))) < 0)
if (errno != EINTR && errno != EAGAIN)
{
- DEBUG_printf(("cupsSideChannelRead: Read error: %s\n", strerror(errno)));
+ DEBUG_printf(("1cupsSideChannelRead: Read error: %s", strerror(errno)));
return (-1);
}
if (buffer[0] < CUPS_SC_CMD_SOFT_RESET ||
buffer[0] > CUPS_SC_CMD_SNMP_GET_NEXT)
{
- DEBUG_printf(("cupsSideChannelRead: Bad command %d!\n", buffer[0]));
+ DEBUG_printf(("1cupsSideChannelRead: Bad command %d!", buffer[0]));
return (-1);
}
memcpy(data, buffer + 4, templen);
}
- DEBUG_printf(("cupsSideChannelRead: Returning status=%d\n", *status));
+ DEBUG_printf(("1cupsSideChannelRead: Returning status=%d", *status));
return (0);
}
* support SNMP queries. @code CUPS_SC_STATUS_NO_RESPONSE@ is returned when
* the printer does not respond to the SNMP query.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
cups_sc_status_t /* O - Query status */
DEBUG_printf(("cupsSideChannelSNMPGet(oid=\"%s\", data=%p, datalen=%p(%d), "
- "timeout=%.3f)\n", oid, data, datalen, datalen ? *datalen : -1,
+ "timeout=%.3f)", oid, data, datalen, datalen ? *datalen : -1,
timeout));
/*
*/
if (cupsSideChannelWrite(CUPS_SC_CMD_SNMP_GET, CUPS_SC_STATUS_NONE, oid,
- (int)strlen(oid), timeout))
+ (int)strlen(oid) + 1, timeout))
return (CUPS_SC_STATUS_TIMEOUT);
real_datalen = sizeof(real_data);
* support SNMP queries. @code CUPS_SC_STATUS_NO_RESPONSE@ is returned when
* the printer does not respond to the first SNMP query.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
cups_sc_status_t /* O - Status of first query of @code CUPS_SC_STATUS_OK@ on success */
DEBUG_printf(("cupsSideChannelSNMPWalk(oid=\"%s\", timeout=%.3f, cb=%p, "
- "context=%p)\n", oid, timeout, cb, context));
+ "context=%p)", oid, timeout, cb, context));
/*
* Range check input...
*/
if (cupsSideChannelWrite(CUPS_SC_CMD_SNMP_GET_NEXT, CUPS_SC_STATUS_NONE,
- current_oid, (int)strlen(current_oid), timeout))
+ current_oid, (int)strlen(current_oid) + 1, timeout))
return (CUPS_SC_STATUS_TIMEOUT);
real_datalen = sizeof(real_data);