dest,
lp_cldap_port(tctx->lp_ctx),
&dest_addr);
+ CHECK_VAL(ret, 0);
status = cldap_socket_init(tctx, NULL, NULL, dest_addr, &cldap);
CHECK_STATUS(status, NT_STATUS_OK);
uint32_t server_type;
struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
+ /* cldap_socket_init should now know about the dest. address */
status = cldap_socket_init(tctx, NULL, NULL, NULL, &cldap);
CHECK_STATUS(status, NT_STATUS_OK);
uint32_t server_type;
struct netlogon_samlogon_response n1;
struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
-
bool result = true;
+ /* cldap_socket_init should now know about the dest. address */
status = cldap_socket_init(tctx, NULL, NULL, NULL, &cldap);
CHECK_STATUS(status, NT_STATUS_OK);
const char *attrs2[] = { "currentTime", "highestCommittedUSN", "netlogon", NULL };
const char *attrs3[] = { "netlogon", NULL };
+ /* cldap_socket_init should now know about the dest. address */
status = cldap_socket_init(tctx, NULL, NULL, NULL, &cldap);
CHECK_STATUS(status, NT_STATUS_OK);
#include "libcli/resolve/resolve.h"
#include "torture/torture.h"
#include "param/param.h"
+#include "../lib/tsocket/tsocket.h"
+
+#define CHECK_VAL(v, correct) torture_assert_int_equal(tctx, (v), (correct), "incorrect value");
struct bench_state {
struct torture_context *tctx;
struct cldap_socket *cldap;
int num_sent=0;
struct timeval tv = timeval_current();
- bool ret = true;
int timelimit = torture_setting_int(tctx, "timelimit", 10);
struct cldap_netlogon search;
struct bench_state *state;
NTSTATUS status;
+ struct tsocket_address *dest_addr;
+ int ret;
- status = cldap_socket_init(tctx, tctx->ev, NULL, NULL, &cldap);
+ ret = tsocket_address_inet_from_strings(tctx, "ip",
+ address,
+ lp_cldap_port(tctx->lp_ctx),
+ &dest_addr);
+ CHECK_VAL(ret, 0);
+
+ status = cldap_socket_init(tctx, tctx->ev, NULL, dest_addr, &cldap);
torture_assert_ntstatus_ok(tctx, status, "cldap_socket_init");
state = talloc_zero(tctx, struct bench_state);
state->fail_count);
talloc_free(cldap);
- return ret;
+ return true;
}
static void request_rootdse_handler(struct tevent_req *req)
struct cldap_socket *cldap;
int num_sent=0;
struct timeval tv = timeval_current();
- bool ret = true;
int timelimit = torture_setting_int(tctx, "timelimit", 10);
struct cldap_search search;
struct bench_state *state;
NTSTATUS status;
+ /* cldap_socket_init should now know about the dest. address */
status = cldap_socket_init(tctx, tctx->ev, NULL, NULL, &cldap);
torture_assert_ntstatus_ok(tctx, status, "cldap_socket_init");
state->fail_count);
talloc_free(cldap);
- return ret;
+ return true;
}
/*