diff options
author | Volker Lendecke <vl@samba.org> | 2011-05-28 20:52:06 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-05-28 20:50:10 +0200 |
commit | 54970f90f6966f8b0c17a7c2badda619c2ebc13a (patch) | |
tree | 6f114a7e77421c8cd1770f39eec8718241879105 | |
parent | 06eec02e746860fb55901b65da44f50c35b48568 (diff) | |
download | samba-54970f90f6966f8b0c17a7c2badda619c2ebc13a.tar.gz samba-54970f90f6966f8b0c17a7c2badda619c2ebc13a.tar.bz2 samba-54970f90f6966f8b0c17a7c2badda619c2ebc13a.zip |
s3: Use cli_connect_nb in cli_servertime
-rw-r--r-- | source3/utils/net_time.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c index 0edb58c14a..46ce558d89 100644 --- a/source3/utils/net_time.c +++ b/source3/utils/net_time.c @@ -26,34 +26,18 @@ */ static time_t cli_servertime(const char *host, struct sockaddr_storage *pss, int *zone) { - struct nmb_name calling, called; time_t ret = 0; struct cli_state *cli = NULL; NTSTATUS status; - cli = cli_initialise(); - if (!cli) { - goto done; - } - - status = cli_connect(cli, host, pss); + status = cli_connect_nb(host, pss, 0, 0x20, global_myname(), + Undefined, &cli); if (!NT_STATUS_IS_OK(status)) { fprintf(stderr, _("Can't contact server %s. Error %s\n"), host, nt_errstr(status)); goto done; } - make_nmb_name(&calling, global_myname(), 0x0); - if (host) { - make_nmb_name(&called, host, 0x20); - } else { - make_nmb_name(&called, "*SMBSERVER", 0x20); - } - - if (!cli_session_request(cli, &calling, &called)) { - fprintf(stderr, _("Session request failed\n")); - goto done; - } status = cli_negprot(cli); if (!NT_STATUS_IS_OK(status)) { fprintf(stderr, _("Protocol negotiation failed: %s\n"), |