diff options
author | Michael Adam <obnox@samba.org> | 2011-08-24 13:08:13 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 14:17:56 +0200 |
commit | 0e28448a780cf231ae38fe03a85cf6e1ea9dded0 (patch) | |
tree | 91878c39866520bc06d968cd44cd8a86995cc8ad /source3/printing | |
parent | 25a9978c2c4d00eb64b212170f64f5cc136e032a (diff) | |
download | samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.tar.gz samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.tar.bz2 samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.zip |
s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/printer_list.c | 10 |
1 files changed, 4 insertions, 6 deletions
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; } |