From 0e28448a780cf231ae38fe03a85cf6e1ea9dded0 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 24 Aug 2011 13:08:13 +0200 Subject: s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS --- source3/printing/printer_list.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/printer_list.c b/source3/printing/printer_list.c index 82c43bf3b0..61475fe539 100644 --- a/source3/printing/printer_list.c +++ b/source3/printing/printer_list.c @@ -90,10 +90,9 @@ NTSTATUS printer_list_get_printer(TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - data = dbwrap_fetch_bystring_upper(db, key, key); - if (data.dptr == NULL) { + status = dbwrap_fetch_bystring_upper(db, key, key, &data); + if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Failed to fetch record!\n")); - status = NT_STATUS_NOT_FOUND; goto done; } @@ -216,10 +215,9 @@ NTSTATUS printer_list_get_last_refresh(time_t *last_refresh) ZERO_STRUCT(data); - data = dbwrap_fetch_bystring(db, talloc_tos(), PL_TIMESTAMP_KEY); - if (data.dptr == NULL) { + status = dbwrap_fetch_bystring(db, talloc_tos(), PL_TIMESTAMP_KEY, &data); + if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Failed to fetch record!\n")); - status = NT_STATUS_NOT_FOUND; goto done; } -- cgit