/*
- * "$Id: cups-deviced.c 5044 2006-02-01 21:35:30Z mike $"
+ * "$Id: cups-deviced.c 5099 2006-02-13 02:46:10Z mike $"
*
* Device scanning mini-daemon for the Common UNIX Printing System (CUPS).
*
- * Copyright 1997-2005 by Easy Software Products.
+ * Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
{
fputs("Usage: cups-deviced request-id limit user-id options\n", stderr);
- cupsdSendIPPHeader(IPP_BAD_REQUEST, request_id);
- cupsdSendIPPGroup(IPP_TAG_OPERATION);
- cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
- cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
- "en-US");
- cupsdSendIPPString(IPP_TAG_TEXT, "status-message",
- "Bad command-line arguments passed to cups-deviced!");
- cupsdSendIPPTrailer();
-
return (1);
}
{
fprintf(stderr, "cups-deviced: Bad request ID %d!\n", request_id);
- cupsdSendIPPHeader(IPP_BAD_REQUEST, request_id);
- cupsdSendIPPGroup(IPP_TAG_OPERATION);
- cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
- cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
- "en-US");
- cupsdSendIPPString(IPP_TAG_TEXT, "status-message",
- "Bad request ID argument passed to cups-deviced!");
- cupsdSendIPPTrailer();
-
return (1);
}
{
fprintf(stderr, "cups-deviced: Bad user %d!\n", normal_user);
- cupsdSendIPPHeader(IPP_BAD_REQUEST, request_id);
- cupsdSendIPPGroup(IPP_TAG_OPERATION);
- cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
- cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
- "en-US");
- cupsdSendIPPString(IPP_TAG_TEXT, "status-message",
- "Bad user ID argument passed to cups-deviced!");
- cupsdSendIPPTrailer();
-
return (1);
}
fprintf(stderr, "ERROR: [cups-deviced] Unable to open backend directory "
"\"%s\": %s", backends, strerror(errno));
- snprintf(line, sizeof(line), "Unable to open backend directory \"%s\": %s",
- backends, strerror(errno));
- cupsdSendIPPHeader(IPP_BAD_REQUEST, request_id);
- cupsdSendIPPGroup(IPP_TAG_OPERATION);
- cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
- cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
- "en-US");
- cupsdSendIPPString(IPP_TAG_TEXT, "status-message", line);
- cupsdSendIPPTrailer();
-
return (1);
}
/*
- * End of "$Id: cups-deviced.c 5044 2006-02-01 21:35:30Z mike $".
+ * End of "$Id: cups-deviced.c 5099 2006-02-13 02:46:10Z mike $".
*/