diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-03-13 18:12:21 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:32 -0500 |
commit | 63fd883e54ea6fe808b72368e95aeebf265f2451 (patch) | |
tree | 8ba4eef17b9d95fb3bdc75d73d3880a0384ebaaf | |
parent | 31c674bffc2b2a1ab4a1b1b14e1fd3a87ab9db8e (diff) | |
download | samba-63fd883e54ea6fe808b72368e95aeebf265f2451.tar.gz samba-63fd883e54ea6fe808b72368e95aeebf265f2451.tar.bz2 samba-63fd883e54ea6fe808b72368e95aeebf265f2451.zip |
r21826: reorder functions
metze
(This used to be commit 3d0a810ccd5d7490d46f91ca6aef6052ca0c56c3)
-rw-r--r-- | source4/libnet/libnet_unbecome_dc.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c index ffec396e21..c0dbfcc68d 100644 --- a/source4/libnet/libnet_unbecome_dc.c +++ b/source4/libnet/libnet_unbecome_dc.c @@ -94,6 +94,31 @@ struct libnet_UnbecomeDC_state { } dest_dsa; }; +static void unbecomeDC_recv_cldap(struct cldap_request *req); + +static void unbecomeDC_send_cldap(struct libnet_UnbecomeDC_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 = unbecomeDC_recv_cldap; + req->async.private = s; +} + static void unbecomeDC_connect_ldap(struct libnet_UnbecomeDC_state *s); static void unbecomeDC_recv_cldap(struct cldap_request *req) @@ -120,29 +145,6 @@ static void unbecomeDC_recv_cldap(struct cldap_request *req) unbecomeDC_connect_ldap(s); } -static void unbecomeDC_send_cldap(struct libnet_UnbecomeDC_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 = unbecomeDC_recv_cldap; - req->async.private = s; -} - static NTSTATUS unbecomeDC_ldap_connect(struct libnet_UnbecomeDC_state *s) { char *url; |