s4:ldap_server: fix typo in DEBUG() message
[kai/samba-autobuild/.git] / source4 / ldap_server / ldap_server.c
index 605a4a3cc2932f025b18d0b50399f638cf9cac58..b773716bd215f8860b80fed2672d6a88207d2249 100644 (file)
@@ -334,6 +334,8 @@ static void ldapsrv_accept(struct stream_connection *c,
 
        conn->session_info = session_info;
 
+       conn->sockets.active = conn->sockets.raw;
+
        if (!NT_STATUS_IS_OK(ldapsrv_backend_Init(conn))) {
                ldapsrv_terminate_connection(conn, "backend Init failed");
                return;
@@ -345,8 +347,6 @@ static void ldapsrv_accept(struct stream_connection *c,
        /* register the server */       
        irpc_add_name(c->msg_ctx, "ldap_server");
 
-       conn->sockets.active = conn->sockets.raw;
-
        if (port != 636 && port != 3269) {
                ldapsrv_call_read_next(conn);
                return;
@@ -708,7 +708,7 @@ static struct tevent_req *ldapsrv_process_call_send(TALLOC_CTX *mem_ctx,
        ok = tevent_queue_add(call_queue, ev, req,
                              ldapsrv_process_call_trigger, NULL);
        if (!ok) {
-               tevent_req_nomem(NULL, req);
+               tevent_req_oom(req);
                return tevent_req_post(req, ev);
        }
 
@@ -815,7 +815,7 @@ static NTSTATUS add_socket(struct task_server *task,
 
        status = stream_setup_socket(task, task->event_ctx, lp_ctx,
                                     model_ops, &ldap_stream_nonpriv_ops,
-                                    "ipv4", address, &port, 
+                                    "ip", address, &port,
                                     lpcfg_socket_options(lp_ctx),
                                     ldap_service);
        if (!NT_STATUS_IS_OK(status)) {
@@ -830,7 +830,7 @@ static NTSTATUS add_socket(struct task_server *task,
                status = stream_setup_socket(task, task->event_ctx, lp_ctx,
                                             model_ops,
                                             &ldap_stream_nonpriv_ops,
-                                            "ipv4", address, &port, 
+                                            "ip", address, &port,
                                             lpcfg_socket_options(lp_ctx),
                                             ldap_service);
                if (!NT_STATUS_IS_OK(status)) {
@@ -852,7 +852,7 @@ static NTSTATUS add_socket(struct task_server *task,
                status = stream_setup_socket(task, task->event_ctx, lp_ctx,
                                             model_ops,
                                             &ldap_stream_nonpriv_ops,
-                                            "ipv4", address, &port, 
+                                            "ip", address, &port,
                                             lpcfg_socket_options(lp_ctx),
                                             ldap_service);
                if (!NT_STATUS_IS_OK(status)) {
@@ -866,7 +866,7 @@ static NTSTATUS add_socket(struct task_server *task,
                        status = stream_setup_socket(task, task->event_ctx, lp_ctx,
                                                     model_ops,
                                                     &ldap_stream_nonpriv_ops,
-                                                    "ipv4", address, &port,
+                                                    "ip", address, &port,
                                                     lpcfg_socket_options(lp_ctx),
                                                     ldap_service);
                        if (!NT_STATUS_IS_OK(status)) {
@@ -938,7 +938,7 @@ static void ldapsrv_task_init(struct task_server *task)
                                           lpcfg_tls_dhpfile(ldap_service, task->lp_ctx),
                                           &ldap_service->tls_params);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0,("ldapsrv failed tstream_tls_patams_server - %s\n",
+               DEBUG(0,("ldapsrv failed tstream_tls_params_server - %s\n",
                         nt_errstr(status)));
                goto failed;
        }
@@ -951,7 +951,7 @@ static void ldapsrv_task_init(struct task_server *task)
                int num_interfaces;
                int i;
 
-               load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
+               load_interface_list(task, task->lp_ctx, &ifaces);
                num_interfaces = iface_list_count(ifaces);
 
                /* We have been given an interfaces line, and been