diff options
author | Michael Adam <obnox@samba.org> | 2009-07-29 14:16:11 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-07-29 16:26:21 +0200 |
commit | ded0ce8345b99e9d5e0cfaea7cee58648baea4b7 (patch) | |
tree | db3b9a8af509bef9f3e68ab433be9a7971beae50 /source3/winbindd/idmap_tdb.c | |
parent | d916e56c4c9dc729dc88418f75ebbbf943597476 (diff) | |
download | samba-ded0ce8345b99e9d5e0cfaea7cee58648baea4b7.tar.gz samba-ded0ce8345b99e9d5e0cfaea7cee58648baea4b7.tar.bz2 samba-ded0ce8345b99e9d5e0cfaea7cee58648baea4b7.zip |
s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.
Michael
Diffstat (limited to 'source3/winbindd/idmap_tdb.c')
-rw-r--r-- | source3/winbindd/idmap_tdb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index c42cd74cbe..ce7b6aa532 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -401,7 +401,7 @@ static NTSTATUS idmap_tdb_alloc_init( const char *params ) static NTSTATUS idmap_tdb_allocate_id(struct unixid *xid) { - bool ret; + NTSTATUS ret; const char *hwmkey; const char *hwmtype; uint32_t high_hwm; @@ -449,10 +449,11 @@ static NTSTATUS idmap_tdb_allocate_id(struct unixid *xid) /* fetch a new id and increment it */ ret = dbwrap_change_uint32_atomic(idmap_alloc_db, hwmkey, &hwm, 1); - if (ret != 0) { - DEBUG(0, ("Fatal error while fetching a new %s value\n!", hwmtype)); + if (!NT_STATUS_IS_OK(ret)) { + DEBUG(0, ("Fatal error while fetching a new %s value: %s\n!", + hwmtype, nt_errstr(ret))); idmap_alloc_db->transaction_cancel(idmap_alloc_db); - return NT_STATUS_UNSUCCESSFUL; + return ret; } /* recheck it is in the range */ |