diff options
author | Günther Deschner <gd@samba.org> | 2010-09-29 01:18:07 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-09-29 01:23:54 +0200 |
commit | ec33a87d5855348e6de4c1f0f02d3bd5a0638985 (patch) | |
tree | 908c8f124763a9aa9bee1b9594b850d3963f6b0d | |
parent | fcee50b9c9ca157c839df5761ca0a2f87fc1ac33 (diff) | |
download | samba-ec33a87d5855348e6de4c1f0f02d3bd5a0638985.tar.gz samba-ec33a87d5855348e6de4c1f0f02d3bd5a0638985.tar.bz2 samba-ec33a87d5855348e6de4c1f0f02d3bd5a0638985.zip |
s3-printing: skip metadata entry when traversing printerlist.
We were creating a new printer (with a very broken name) out of the
lasttimestamp entry all the time.
Simo, please check.
Guenther
-rw-r--r-- | source3/printing/printer_list.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/printing/printer_list.c b/source3/printing/printer_list.c index 667ff70a05..8e9e06ac7e 100644 --- a/source3/printing/printer_list.c +++ b/source3/printing/printer_list.c @@ -380,6 +380,11 @@ static int printer_list_exec_fn(struct db_record *rec, void *private_data) char *comment; int ret; + /* always skip PL_TIMESTAMP_KEY key */ + if (strequal((const char *)rec->key.dptr, PL_TIMESTAMP_KEY)) { + return 0; + } + ret = tdb_unpack(rec->value.dptr, rec->value.dsize, PL_DATA_FORMAT, &time_h, &time_l, &name, &comment); if (ret == -1) { |