lpcfg_smbcli_options(ntvfs->ctx->lp_ctx, &options);
- creq = smb2_connect_send(p, host,
+ status = smb2_connect(p, host,
lpcfg_parm_string_list(p, ntvfs->ctx->lp_ctx, NULL, "smb2", "ports", NULL),
- remote_share,
- lpcfg_resolve_context(ntvfs->ctx->lp_ctx),
- credentials,
- ntvfs->ctx->event_ctx, &options,
- lpcfg_socket_options(ntvfs->ctx->lp_ctx),
- lpcfg_gensec_settings(p, ntvfs->ctx->lp_ctx)
- );
-
- status = smb2_connect_recv(creq, p, &tree);
+ remote_share,
+ lpcfg_resolve_context(ntvfs->ctx->lp_ctx),
+ credentials,
+ &tree,
+ ntvfs->ctx->event_ctx, &options,
+ lpcfg_socket_options(ntvfs->ctx->lp_ctx),
+ lpcfg_gensec_settings(p, ntvfs->ctx->lp_ctx));
NT_STATUS_NOT_OK_RETURN(status);
status = smb2_get_roothandle(tree, &p->roothandle);