The branch, v3-5-test has been updated via 2abdeca... s3:fix endianness bug in dbwrap_change_int32_atomic() (bug #6901) via caa2ee4... s3:fix endianness bug in dbwrap_change_uint32_atomic() (bug #6901) from 180c938... s3:idmap_ldap: trim the " chars from the location string in idmap_ldap_db_init
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log ----------------------------------------------------------------- commit 2abdeca7af052372b242981ff1ab7863a8951cfd Author: Michael Adam <ob...@samba.org> Date: Sat Nov 21 00:14:29 2009 +0100 s3:fix endianness bug in dbwrap_change_int32_atomic() (bug #6901) Michael commit caa2ee448efd1ebd6d2078972ed838613e7b5151 Author: Michael Adam <ob...@samba.org> Date: Sat Nov 21 00:08:38 2009 +0100 s3:fix endianness bug in dbwrap_change_uint32_atomic() (bug #6901) Michael ----------------------------------------------------------------------- Summary of changes: source3/lib/dbwrap_util.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c index 1c19016..74b2265 100644 --- a/source3/lib/dbwrap_util.c +++ b/source3/lib/dbwrap_util.c @@ -118,7 +118,7 @@ static NTSTATUS dbwrap_change_uint32_atomic_action(struct db_context *db, { struct db_record *rec; uint32 val = -1; - TDB_DATA data; + uint32_t v_store; NTSTATUS ret; struct dbwrap_change_uint32_atomic_context *state; @@ -141,10 +141,12 @@ static NTSTATUS dbwrap_change_uint32_atomic_action(struct db_context *db, val += state->change_val; - data.dsize = sizeof(val); - data.dptr = (uint8 *)&val; + SIVAL(&v_store, 0, val); - ret = rec->store(rec, data, TDB_REPLACE); + ret = rec->store(rec, + make_tdb_data((const uint8 *)&v_store, + sizeof(v_store)), + TDB_REPLACE); done: TALLOC_FREE(rec); @@ -202,7 +204,7 @@ static NTSTATUS dbwrap_change_int32_atomic_action(struct db_context *db, { struct db_record *rec; int32_t val = -1; - TDB_DATA data; + int32_t v_store; NTSTATUS ret; struct dbwrap_change_int32_atomic_context *state; @@ -225,10 +227,12 @@ static NTSTATUS dbwrap_change_int32_atomic_action(struct db_context *db, val += state->change_val; - data.dsize = sizeof(val); - data.dptr = (uint8 *)&val; + SIVAL(&v_store, 0, val); - ret = rec->store(rec, data, TDB_REPLACE); + ret = rec->store(rec, + make_tdb_data((const uint8_t *)&v_store, + sizeof(v_store)), + TDB_REPLACE); done: TALLOC_FREE(rec); -- Samba Shared Repository