libcli/cldap: don't pass tevent_context to cldap_socket_init()
authorStefan Metzmacher <metze@samba.org>
Mon, 10 Oct 2011 13:58:24 +0000 (15:58 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 10 Oct 2011 21:23:07 +0000 (23:23 +0200)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 10 23:23:07 CEST 2011 on sn-devel-104

libcli/cldap/cldap.c
libcli/cldap/cldap.h
source3/libads/cldap.c
source3/nmbd/nmbd_processlogon.c
source4/cldap_server/cldap_server.c
source4/libcli/finddcs_cldap.c
source4/libnet/libnet_become_dc.c
source4/libnet/libnet_site.c
source4/libnet/libnet_unbecome_dc.c
source4/torture/ldap/cldap.c
source4/torture/ldap/cldapbench.c

index 966975d85204e8c9858e22041213c1c3f9bd15b1..219b343d806832d9e3ba4480969515a04327519d 100644 (file)
@@ -304,7 +304,6 @@ done:
   initialise a cldap_sock
 */
 NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx,
-                          struct tevent_context *ev,
                           const struct tsocket_address *local_addr,
                           const struct tsocket_address *remote_addr,
                           struct cldap_socket **_cldap)
index 10c92959e0d30499d59d3efe55ef2868c4108379..0bc9454f80f9dc3e82589c78810ce7de7f9e804d 100644 (file)
@@ -52,7 +52,6 @@ struct cldap_search {
 };
 
 NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx,
-                          struct tevent_context *ev,
                           const struct tsocket_address *local_addr,
                           const struct tsocket_address *remote_addr,
                           struct cldap_socket **_cldap);
index 03fa17c26fd3e02cbd771cf98f6b31b4e32e7f09..4f725a093eadb0f9662018df59c0517baf5f1959 100644 (file)
@@ -59,7 +59,7 @@ bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx,
        /*
         * as we use a connected udp socket
         */
-       status = cldap_socket_init(mem_ctx, NULL, NULL, dest_addr, &cldap);
+       status = cldap_socket_init(mem_ctx, NULL, dest_addr, &cldap);
        TALLOC_FREE(dest_addr);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(2,("Failed to create cldap socket to %s: %s\n",
index f00a8d8e16c2b59cce98b9741e91f70b77a3135d..43ffd726c677e166345b546d52e6a26ca3f5bfa7 100644 (file)
@@ -120,8 +120,7 @@ bool initialize_nmbd_proxy_logon(void)
        }
 
        /* we create a connected udp socket */
-       status = cldap_socket_init(ctx, nmbd_event_context(), NULL,
-                                  server_addr, &ctx->cldap_sock);
+       status = cldap_socket_init(ctx, NULL, server_addr, &ctx->cldap_sock);
        TALLOC_FREE(server_addr);
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(ctx);
index 111493672d3e90d160292c65f5a98cc33ff309da..78712bfecfd7c35acbbacaf3049ed587285b7957 100644 (file)
@@ -125,7 +125,6 @@ static NTSTATUS cldapd_add_socket(struct cldapd_server *cldapd, struct loadparm_
 
        /* listen for unicasts on the CLDAP port (389) */
        status = cldap_socket_init(cldapd,
-                                  cldapd->task->event_ctx,
                                   socket_address,
                                   NULL,
                                   &cldapsock);
index ee5278f051a5ba252f6d1980a350ebdc6b711ab6..0643135cae9f1a4a4e2e79ffd15b77d61b3e9527 100644 (file)
@@ -131,7 +131,7 @@ static bool finddcs_cldap_ipaddress(struct finddcs_cldap_state *state, struct fi
        }
        state->srv_addresses[1] = NULL;
        state->srv_address_index = 0;
-       status = cldap_socket_init(state, state->ev, NULL, NULL, &state->cldap);
+       status = cldap_socket_init(state, NULL, NULL, &state->cldap);
        if (tevent_req_nterror(state->req, status)) {
                return false;
        }
@@ -307,7 +307,7 @@ static void finddcs_cldap_name_resolved(struct composite_context *ctx)
 
        state->srv_address_index = 0;
 
-       status = cldap_socket_init(state, state->ev, NULL, NULL, &state->cldap);
+       status = cldap_socket_init(state, NULL, NULL, &state->cldap);
        if (tevent_req_nterror(state->req, status)) {
                return;
        }
@@ -338,7 +338,7 @@ static void finddcs_cldap_srv_resolved(struct composite_context *ctx)
 
        state->srv_address_index = 0;
 
-       status = cldap_socket_init(state, state->ev, NULL, NULL, &state->cldap);
+       status = cldap_socket_init(state, NULL, NULL, &state->cldap);
        if (tevent_req_nterror(state->req, status)) {
                return;
        }
index 6f70f32903ccbe11aff1e25916d9d357b1df7c95..f0f57d6248046b82b7be3dc30aace4cf90e78757 100644 (file)
@@ -773,8 +773,7 @@ static void becomeDC_send_cldap(struct libnet_BecomeDC_state *s)
                if (!composite_is_ok(c)) return;
        }
 
-       c->status = cldap_socket_init(s, s->libnet->event_ctx,
-                                     NULL, dest_address, &s->cldap.sock);
+       c->status = cldap_socket_init(s, NULL, dest_address, &s->cldap.sock);
        if (!composite_is_ok(c)) return;
 
        req = cldap_netlogon_send(s, s->libnet->event_ctx,
index a74dd59a22bddc3d74c1208d31f7a9c46c279571..288e13d59aeb9b7b1b915ead778c6c8dff21c1e2 100644 (file)
@@ -69,7 +69,7 @@ NTSTATUS libnet_FindSite(TALLOC_CTX *ctx, struct libnet_context *lctx, struct li
        }
 
        /* we want to use non async calls, so we're not passing an event context */
-       status = cldap_socket_init(tmp_ctx, NULL, NULL, dest_address, &cldap);
+       status = cldap_socket_init(tmp_ctx, NULL, dest_address, &cldap);
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(tmp_ctx);
                r->out.error_string = NULL;
index be28907b5baad3df5f764f85dd0797eb1bd18a11..a46d1433bc6f69a33563b0919b151ebd773485e1 100644 (file)
@@ -281,8 +281,7 @@ static void unbecomeDC_send_cldap(struct libnet_UnbecomeDC_state *s)
                if (!composite_is_ok(c)) return;
        }
 
-       c->status = cldap_socket_init(s, s->libnet->event_ctx,
-                                     NULL, dest_address, &s->cldap.sock);
+       c->status = cldap_socket_init(s, NULL, dest_address, &s->cldap.sock);
        if (!composite_is_ok(c)) return;
 
        req = cldap_netlogon_send(s, s->libnet->event_ctx,
index 689e518e778398d32af0019d479d3c181f257e7d..69ed302ec87aea61e22c5e2b8f64640049b5c26d 100644 (file)
@@ -54,7 +54,7 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
                                                &dest_addr);
        CHECK_VAL(ret, 0);
 
-       status = cldap_socket_init(tctx, NULL, NULL, dest_addr, &cldap);
+       status = cldap_socket_init(tctx, NULL, dest_addr, &cldap);
        CHECK_STATUS(status, NT_STATUS_OK);
 
        ZERO_STRUCT(search);
@@ -288,7 +288,7 @@ static bool test_cldap_netlogon_flags(struct torture_context *tctx,
        CHECK_VAL(ret, 0);
 
        /* cldap_socket_init should now know about the dest. address */
-       status = cldap_socket_init(tctx, NULL, NULL, dest_addr, &cldap);
+       status = cldap_socket_init(tctx, NULL, dest_addr, &cldap);
        CHECK_STATUS(status, NT_STATUS_OK);
 
        printf("Printing out netlogon server type flags: %s\n", dest);
@@ -408,7 +408,7 @@ static bool test_cldap_netlogon_flag_ds_dns_forest(struct torture_context *tctx,
        CHECK_VAL(ret, 0);
 
        /* cldap_socket_init should now know about the dest. address */
-       status = cldap_socket_init(tctx, NULL, NULL, dest_addr, &cldap);
+       status = cldap_socket_init(tctx, NULL, dest_addr, &cldap);
        CHECK_STATUS(status, NT_STATUS_OK);
 
        printf("Testing netlogon server type flag NBT_SERVER_FOREST_ROOT: ");
@@ -490,7 +490,7 @@ static bool test_cldap_generic(struct torture_context *tctx, const char *dest)
        CHECK_VAL(ret, 0);
 
        /* cldap_socket_init should now know about the dest. address */
-       status = cldap_socket_init(tctx, NULL, NULL, dest_addr, &cldap);
+       status = cldap_socket_init(tctx, NULL, dest_addr, &cldap);
        CHECK_STATUS(status, NT_STATUS_OK);
 
        ZERO_STRUCT(search);
index 9b87ae31388a1eff8babd601ed298adf00618cab..36b319dec697261f3c0f8cc2937cb0524c4b1de1 100644 (file)
@@ -71,7 +71,7 @@ static bool bench_cldap_netlogon(struct torture_context *tctx, const char *addre
                                                &dest_addr);
        CHECK_VAL(ret, 0);
 
-       status = cldap_socket_init(tctx, tctx->ev, NULL, dest_addr, &cldap);
+       status = cldap_socket_init(tctx, NULL, dest_addr, &cldap);
        torture_assert_ntstatus_ok(tctx, status, "cldap_socket_init");
 
        state = talloc_zero(tctx, struct bench_state);
@@ -156,7 +156,7 @@ static bool bench_cldap_rootdse(struct torture_context *tctx, const char *addres
        CHECK_VAL(ret, 0);
 
        /* cldap_socket_init should now know about the dest. address */
-       status = cldap_socket_init(tctx, tctx->ev, NULL, dest_addr, &cldap);
+       status = cldap_socket_init(tctx, NULL, dest_addr, &cldap);
        torture_assert_ntstatus_ok(tctx, status, "cldap_socket_init");
 
        state = talloc_zero(tctx, struct bench_state);