diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-07-16 14:16:38 +0300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-07-19 17:33:35 +1000 |
commit | 1e20dbd8127bcecda8e4a656d326b391cc5c8e8d (patch) | |
tree | 19345bff50f2f09ac7f178daf6a6cc62ed4bc73d /source4/lib | |
parent | 91d9f88d28e58157ca63caeb76ff779321d7bb53 (diff) | |
download | samba-1e20dbd8127bcecda8e4a656d326b391cc5c8e8d.tar.gz samba-1e20dbd8127bcecda8e4a656d326b391cc5c8e8d.tar.bz2 samba-1e20dbd8127bcecda8e4a656d326b391cc5c8e8d.zip |
s4-test: Use ldb_msg_normalize() in sqlite3 backend
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c index 12af9c5450..2225327bbe 100644 --- a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c +++ b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c @@ -687,14 +687,21 @@ static int lsqlite3_search_callback(void *result, int col_num, char **cols, char /* call the async callback for the last entry * except the first time */ if (ac->current_eid != 0) { - msg = ldb_msg_canonicalize(ldb, msg); - if (!msg) return SQLITE_ABORT; + ret = ldb_msg_normalize(ldb, ac->req, msg, &msg); + if (ret != LDB_SUCCESS) { + return SQLITE_ABORT; + } ret = ldb_module_send_entry(ac->req, msg, NULL); if (ret != LDB_SUCCESS) { ac->callback_failed = true; + /* free msg object */ + TALLOC_FREE(msg); return SQLITE_ABORT; } + + /* free msg object */ + TALLOC_FREE(msg); } /* start over */ @@ -960,8 +967,10 @@ int lsql_search(struct lsql_context *ctx) /* complete the last message if any */ if (ctx->ares) { - ctx->ares->message = ldb_msg_canonicalize(ldb, ctx->ares->message); - if (ctx->ares->message == NULL) { + ret = ldb_msg_normalize(ldb, ctx->ares, + ctx->ares->message, + &ctx->ares->message); + if (ret != LDB_SUCCESS) { return LDB_ERR_OPERATIONS_ERROR; } |