diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-03-13 14:32:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:32 -0500 |
commit | 952a90814f481b0b0486d093d72e6786f01d87a7 (patch) | |
tree | f72ac0f88abf3f542545fce03d5db0319c98b080 /source4/libnet | |
parent | d0f989628a777943c7c0b1f306e967cc4ba7a63f (diff) | |
download | samba-952a90814f481b0b0486d093d72e6786f01d87a7.tar.gz samba-952a90814f481b0b0486d093d72e6786f01d87a7.tar.bz2 samba-952a90814f481b0b0486d093d72e6786f01d87a7.zip |
r21820: move function, so that all are in top-down order as they get called
metze
(This used to be commit 38bb7f5445cf1d1a52a9edb21475ed2d5ed20ce4)
Diffstat (limited to 'source4/libnet')
-rw-r--r-- | source4/libnet/libnet_become_dc.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index 28939d94f9..dc1b064eb0 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -87,6 +87,31 @@ struct libnet_BecomeDC_state { struct libnet_BecomeDC_Callbacks callbacks; }; +static void becomeDC_recv_cldap(struct cldap_request *req); + +static void becomeDC_send_cldap(struct libnet_BecomeDC_state *s) +{ + struct composite_context *c = s->creq; + struct cldap_request *req; + + s->cldap.io.in.dest_address = s->source_dsa.address; + s->cldap.io.in.realm = s->domain.dns_name; + s->cldap.io.in.host = s->dest_dsa.netbios_name; + s->cldap.io.in.user = NULL; + s->cldap.io.in.domain_guid = NULL; + s->cldap.io.in.domain_sid = NULL; + s->cldap.io.in.acct_control = -1; + s->cldap.io.in.version = 6; + + s->cldap.sock = cldap_socket_init(s, s->libnet->event_ctx); + if (composite_nomem(s->cldap.sock, c)) return; + + req = cldap_netlogon_send(s->cldap.sock, &s->cldap.io); + if (composite_nomem(req, c)) return; + req->async.fn = becomeDC_recv_cldap; + req->async.private = s; +} + static void becomeDC_connect_ldap1(struct libnet_BecomeDC_state *s); static void becomeDC_recv_cldap(struct cldap_request *req) @@ -115,29 +140,6 @@ static void becomeDC_recv_cldap(struct cldap_request *req) becomeDC_connect_ldap1(s); } -static void becomeDC_send_cldap(struct libnet_BecomeDC_state *s) -{ - struct composite_context *c = s->creq; - struct cldap_request *req; - - s->cldap.io.in.dest_address = s->source_dsa.address; - s->cldap.io.in.realm = s->domain.dns_name; - s->cldap.io.in.host = s->dest_dsa.netbios_name; - s->cldap.io.in.user = NULL; - s->cldap.io.in.domain_guid = NULL; - s->cldap.io.in.domain_sid = NULL; - s->cldap.io.in.acct_control = -1; - s->cldap.io.in.version = 6; - - s->cldap.sock = cldap_socket_init(s, s->libnet->event_ctx); - if (composite_nomem(s->cldap.sock, c)) return; - - req = cldap_netlogon_send(s->cldap.sock, &s->cldap.io); - if (composite_nomem(req, c)) return; - req->async.fn = becomeDC_recv_cldap; - req->async.private = s; -} - static NTSTATUS becomeDC_ldap_connect(struct libnet_BecomeDC_state *s, struct becomeDC_ldap *ldap) { char *url; |