]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/ipp.c
Remove support for AIX, HP-UX, and OSF/1.
[thirdparty/cups.git] / backend / ipp.c
index 7eec579468e8ed0ad1774c26f14a152ac4bfa811..1bbd73c3f9e7c89fa88f45981c8ce5fc31697e5e 100644 (file)
@@ -1699,8 +1699,8 @@ main(int  argc,                           /* I - Number of command-line args */
          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,
@@ -2602,17 +2602,27 @@ new_request(
                      "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;