]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-libads: fix get_remote_printer_publishing_data after spoolss_EnumPrinterDataEx...
authorGünther Deschner <gd@samba.org>
Thu, 4 Mar 2010 16:58:49 +0000 (17:58 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 11 Mar 2010 09:31:28 +0000 (10:31 +0100)
Guenther

source3/libads/ldap_printer.c

index 7fec58c7ebc9e07f8524d035ecfa72e57fb6b926..13be6a65c164878c00c5cbf962bd3830f32ee965 100644 (file)
@@ -345,19 +345,13 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
                /* Have the data we need now, so start building */
                for (i=0; i < count; i++) {
                        REGISTRY_VALUE v;
-                       DATA_BLOB blob;
-
-                       result = push_spoolss_PrinterData(mem_ctx, &blob,
-                                                         info[i].type,
-                                                         info[i].data);
-                       if (W_ERROR_IS_OK(result)) {
-                               fstrcpy(v.valuename, info[i].value_name);
-                               v.type = info[i].type;
-                               v.data_p = blob.data;
-                               v.size = blob.length;
-
-                               map_regval_to_ads(mem_ctx, mods, &v);
-                       }
+
+                       fstrcpy(v.valuename, info[i].value_name);
+                       v.type = info[i].type;
+                       v.data_p = info[i].data->data;
+                       v.size = info[i].data->length;
+
+                       map_regval_to_ads(mem_ctx, mods, &v);
                }
        }
 
@@ -372,19 +366,13 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
        } else {
                for (i=0; i < count; i++) {
                        REGISTRY_VALUE v;
-                       DATA_BLOB blob = data_blob_null;
-
-                       result = push_spoolss_PrinterData(mem_ctx, &blob,
-                                                         info[i].type,
-                                                         info[i].data);
-                       if (W_ERROR_IS_OK(result)) {
-                               fstrcpy(v.valuename, info[i].value_name);
-                               v.type = info[i].type;
-                               v.data_p = blob.data;
-                               v.size = blob.length;
-
-                               map_regval_to_ads(mem_ctx, mods, &v);
-                       }
+
+                       fstrcpy(v.valuename, info[i].value_name);
+                       v.type = info[i].type;
+                       v.data_p = info[i].data->data;
+                       v.size = info[i].data->length;
+
+                       map_regval_to_ads(mem_ctx, mods, &v);
                }
        }