r12608: Remove some unused #include lines.
[bbaumbach/samba-autobuild/.git] / source4 / ldap_server / ldap_backend.c
index 6ac9839e297b560943ff90d9ee60cf223dec928c..637ce7bd6380419f74776207a48ef0128ce14be1 100644 (file)
@@ -21,7 +21,6 @@
 #include "includes.h"
 #include "ldap_server/ldap_server.h"
 #include "dlinklist.h"
-#include "libcli/ldap/ldap.h"
 
 
 struct ldapsrv_reply *ldapsrv_init_reply(struct ldapsrv_call *call, uint8_t type)
@@ -38,28 +37,20 @@ struct ldapsrv_reply *ldapsrv_init_reply(struct ldapsrv_call *call, uint8_t type
                return NULL;
        }
 
-       reply->prev = reply->next = NULL;
-       reply->state = LDAPSRV_REPLY_STATE_NEW;
        reply->msg->messageid = call->request->messageid;
        reply->msg->type = type;
 
        return reply;
 }
 
-NTSTATUS ldapsrv_queue_reply(struct ldapsrv_call *call, struct ldapsrv_reply *reply)
+void ldapsrv_queue_reply(struct ldapsrv_call *call, struct ldapsrv_reply *reply)
 {
        DLIST_ADD_END(call->replies, reply, struct ldapsrv_reply *);
-       return NT_STATUS_OK;
 }
 
 struct ldapsrv_partition *ldapsrv_get_partition(struct ldapsrv_connection *conn, const char *dn, uint8_t scope)
 {
-       if (scope == LDAP_SEARCH_SCOPE_BASE
-           && strcasecmp("", dn) == 0) {
-               return conn->service->rootDSE;
-       }
-
-       return conn->service->default_partition;
+       return conn->default_partition;
 }
 
 NTSTATUS ldapsrv_unwilling(struct ldapsrv_call *call, int error)
@@ -83,7 +74,8 @@ NTSTATUS ldapsrv_unwilling(struct ldapsrv_call *call, int error)
        r->value.data = NULL;
        r->value.length = 0;
 
-       return ldapsrv_queue_reply(call, reply);
+       ldapsrv_queue_reply(call, reply);
+       return NT_STATUS_OK;
 }
 
 static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
@@ -112,7 +104,8 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
                done->errormessage = NULL;
                done->referral = NULL;
 
-               return ldapsrv_queue_reply(call, done_r);
+               ldapsrv_queue_reply(call, done_r);
+               return NT_STATUS_OK;
        }
 
        return part->ops->Search(part, call, req);
@@ -225,7 +218,8 @@ static NTSTATUS ldapsrv_ExtendedRequest(struct ldapsrv_call *call)
 
        ZERO_STRUCT(reply->msg->r);
 
-       return ldapsrv_queue_reply(call, reply);
+       ldapsrv_queue_reply(call, reply);
+       return NT_STATUS_OK;
 }
 
 NTSTATUS ldapsrv_do_call(struct ldapsrv_call *call)
@@ -255,3 +249,5 @@ NTSTATUS ldapsrv_do_call(struct ldapsrv_call *call)
                return ldapsrv_unwilling(call, 2);
        }
 }
+
+