ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, argv[2]);
- if ((i + 1) >= num_files)
- ippAddBoolean(request, IPP_TAG_OPERATION, "last-document", 1);
+ ippAddBoolean(request, IPP_TAG_OPERATION, "last-document",
+ (i + 1) >= num_files);
if (document_format)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
"job-password-encryption", NULL, keyword);
}
- if (pc->account_id &&
- (keyword = cupsGetOption("job-account-id", num_options,
- options)) != NULL)
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME, "job-account-id",
- NULL, keyword);
+ if (pc->account_id)
+ {
+ if ((keyword = cupsGetOption("job-account-id", num_options,
+ options)) == NULL)
+ keyword = cupsGetOption("job-billing", num_options, options);
- if (pc->accounting_user_id &&
- (keyword = cupsGetOption("job-accounting-user-id", num_options,
- options)) != NULL)
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME,
- "job-accounting-user-id", NULL, keyword);
+ if (keyword)
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME, "job-account-id",
+ NULL, keyword);
+ }
+
+ if (pc->accounting_user_id)
+ {
+ if ((keyword = cupsGetOption("job-accounting-user-id", num_options,
+ options)) == NULL)
+ keyword = user;
+
+ if (keyword)
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME,
+ "job-accounting-user-id", NULL, keyword);
+ }
for (mandatory = (char *)cupsArrayFirst(pc->mandatory);
mandatory;