cupsSetPasswordCB is not calling cups_passwd_cb
akbar
akbarbasha at tataelxsi.co.in
Wed Feb 24 07:25:32 PST 2010
static void
while releasing the job i am calling cupsSetPasswordCB sa show below , cupsSetPasswordCB is not calling cups_passwd_cb as my nslog on cups_passwd_cb is not displaying in the console.
what might be the problem.please give me some suggestions.
static const char * /* O - Password or NULL */
cups_passwd_cb(const char *prompt); /* I - Prompt */
release_Job(http_t *http, /* I - HTTP connection to server */
const char *dest,int jobId) /* I - Destination */
{
cupsSetPasswordCB(cups_passwd_cb);
request = ippNew();
/* Set up the request */
request->request.op.operation_id = IPP_RELEASE_JOB;
request->request.op.request_id = 1;
language = cupsLangDefault();
// ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
// "auth-info-required", NULL," none");
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
"attributes-charset", NULL, cupsLangEncoding(language));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
static const char * /* O - Password or NULL */
cups_passwd_cb(const char *prompt) /* I - Prompt */
{
NSLog(@"inside cups_passwd_cb");
/*
* Always return NULL to indicate that no password is available...
*/
//char password[23]= "root123";
(void)prompt;
return (NULL);
}
More information about the cups-devel
mailing list