diff options
author | Vincent Untz <vuntz@novell.com> | 2012-03-02 14:09:26 +0100 |
---|---|---|
committer | Vincent Untz <vuntz@novell.com> | 2012-03-02 14:24:42 +0100 |
commit | c2d079439c501bcbf1c7c7022687ce286ba35943 (patch) | |
tree | 5b7140240fe0000cd6c3b092a606fa2e972506b7 | |
parent | 14d7d58d30511cea7d4ab64ed9738ca86257ced9 (diff) |
Use _cph_cups_add_requesting_user_name() instead of manual tag
We have a nice function, let's use it :-)
-rw-r--r-- | src/cups.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -722,8 +722,7 @@ _cph_cups_send_new_simple_job_request (CphCups *cups, _cph_cups_add_job_uri (request, job_id); if (user_name != NULL) - ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, - "requesting-user-name", NULL, user_name); + _cph_cups_add_requesting_user_name (request, user_name); return _cph_cups_send_request (cups, request, resource); } @@ -744,8 +743,7 @@ _cph_cups_send_new_job_attributes_request (CphCups *cups, _cph_cups_add_job_uri (request, job_id); if (user_name != NULL) - ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, - "requesting-user-name", NULL, user_name); + _cph_cups_add_requesting_user_name (request, user_name); num_options = cupsAddOption (name, value, num_options, &options); @@ -2395,8 +2393,7 @@ cph_cups_job_cancel (CphCups *cups, _cph_cups_add_job_uri (request, job_id); if (user_name != NULL) - ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, - "requesting-user-name", NULL, user_name); + _cph_cups_add_requesting_user_name (request, user_name); #if (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 4) || CUPS_VERSION_MAJOR > 1 if (purge_job) @@ -2471,8 +2468,7 @@ cph_cups_job_get_status (CphCups *cups, /* Request attributes explicitly as the user running the process (as * opposed to the user doing the dbus call). This is root in general, * so we'll be authorized to get attributes for all jobs. */ - ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME, - "requesting-user-name", NULL, cupsUser ()); + _cph_cups_add_requesting_user_name (request, cupsUser ()); resource_char = _cph_cups_get_resource (CPH_RESOURCE_ROOT); reply = cupsDoRequest (cups->priv->connection, |