[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-2207-g6836b16
Andrew Tridgell
tridge at samba.org
Wed Jun 10 00:34:36 GMT 2009
The branch, master has been updated
via 6836b16ddac590b9cb23c4c5497aacd3bc371968 (commit)
from 48dbfc89cf532704a0e2fedff828a0a48476053f (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6836b16ddac590b9cb23c4c5497aacd3bc371968
Author: Andrew Tridgell <tridge at samba.org>
Date: Wed Jun 10 10:33:53 2009 +1000
fixed server side sort control
when sorting a record that does not have the requested sort attribute
then put those records last in the sort result
-----------------------------------------------------------------------
Summary of changes:
source4/lib/ldb/modules/sort.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/lib/ldb/modules/sort.c b/source4/lib/ldb/modules/sort.c
index b4f76e1..a95a861 100644
--- a/source4/lib/ldb/modules/sort.c
+++ b/source4/lib/ldb/modules/sort.c
@@ -117,10 +117,13 @@ static int sort_compare(struct ldb_message **msg1, struct ldb_message **msg2, vo
el1 = ldb_msg_find_element(*msg1, ac->attributeName);
el2 = ldb_msg_find_element(*msg2, ac->attributeName);
- if (!el1 || !el2) {
- /* the attribute was not found return and
- * set an error */
- ac->sort_result = LDB_ERR_UNWILLING_TO_PERFORM;
+ if (!el1 && el2) {
+ return 1;
+ }
+ if (el1 && !el2) {
+ return -1;
+ }
+ if (!el1 && !el2) {
return 0;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list