diff options
author | Vincent Untz <vuntz@novell.com> | 2008-11-20 14:18:19 +0100 |
---|---|---|
committer | Vincent Untz <vuntz@novell.com> | 2008-11-20 14:18:19 +0100 |
commit | 32652bcef3548370a165f9657ed5fee7759a1dec (patch) | |
tree | f4e7480b8beee27e0767ba79f5fc1d14b00f13c0 | |
parent | 7831595099f4f6cd11b8dab4604434ccb129f498 (diff) |
Fix stupid crash in _cps_cups_printer_class_set_users().
And remove debug output committed by accident.
-rw-r--r-- | src/cups-pk-helper-mechanism.c | 3 | ||||
-rw-r--r-- | src/cups.c | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/cups-pk-helper-mechanism.c b/src/cups-pk-helper-mechanism.c index 74e6442..c86fc20 100644 --- a/src/cups-pk-helper-mechanism.c +++ b/src/cups-pk-helper-mechanism.c @@ -595,15 +595,12 @@ cph_mechanism_printer_set_users_denied (CphMechanism *mechanism, reset_killtimer (mechanism); - g_print ("hello?\n"); if (!_check_polkit_for_action (mechanism, context, "printeraddremove")) return FALSE; - g_print ("hello!\n"); ret = cph_cups_printer_class_set_users_denied (mechanism->priv->cups, name, users); _cph_mechanism_return_error (mechanism, context, !ret); - g_print ("%s\n", cph_cups_last_status_to_string (mechanism->priv->cups)); return TRUE; } @@ -517,8 +517,8 @@ _cps_cups_printer_class_set_users (CphCups *cups, request = ippNewRequest (CUPS_ADD_MODIFY_PRINTER); _cph_cups_add_printer_uri (request, printer_name); - ippAddStrings (request, IPP_TAG_PRINTER, IPP_TAG_NAME, - request_name, len ? len : 1, NULL, NULL); + attr = ippAddStrings (request, IPP_TAG_PRINTER, IPP_TAG_NAME, + request_name, len ? len : 1, NULL, NULL); if (len == 0) attr->values[0].string.text = g_strdup (default_value); else { @@ -542,8 +542,8 @@ _cps_cups_printer_class_set_users (CphCups *cups, request = ippNewRequest (CUPS_ADD_MODIFY_CLASS); _cph_cups_add_class_uri (request, printer_name); - ippAddStrings (request, IPP_TAG_PRINTER, IPP_TAG_NAME, - request_name, len ? len : 1, NULL, NULL); + attr = ippAddStrings (request, IPP_TAG_PRINTER, IPP_TAG_NAME, + request_name, len ? len : 1, NULL, NULL); if (len == 0) attr->values[0].string.text = g_strdup (default_value); else { |