return -1;
}
+static int ldapsrv_call_destructor(struct ldapsrv_call *call)
+{
+ if (call->conn == NULL) {
+ return 0;
+ }
+
+ DLIST_REMOVE(call->conn->pending_calls, call);
+
+ call->conn = NULL;
+ return 0;
+}
+
static struct tevent_req *ldapsrv_process_call_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct tevent_queue *call_queue,
ldapsrv_terminate_connection(conn, "no memory");
return;
}
+ talloc_set_destructor(call, ldapsrv_call_destructor);
call->conn = conn;