diff options
-rw-r--r-- | lib/tsocket/tsocket.h | 13 | ||||
-rw-r--r-- | lib/tsocket/tsocket_bsd.c | 3 | ||||
-rw-r--r-- | source4/libcli/wrepl/winsrepl.c | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/lib/tsocket/tsocket.h b/lib/tsocket/tsocket.h index 3dd96664ea..3aca536124 100644 --- a/lib/tsocket/tsocket.h +++ b/lib/tsocket/tsocket.h @@ -724,23 +724,28 @@ struct tevent_req *tstream_inet_tcp_connect_send(TALLOC_CTX *mem_ctx, * * @param[in] mem_ctx The talloc memory context to use. * - * @param[in] stream A tstream_context pointer to setup the tcp communication + * @param[out] stream A tstream_context pointer to setup the tcp communication * on. This function will allocate the memory. * + * @param[out] local The real 'inet' tsocket_address of the local endpoint. + * This parameter is optional and can be NULL. + * * @return 0 on success, -1 on error with perrno set. */ int tstream_inet_tcp_connect_recv(struct tevent_req *req, int *perrno, TALLOC_CTX *mem_ctx, - struct tstream_context **stream); + struct tstream_context **stream, + struct tsocket_address **local) #else int _tstream_inet_tcp_connect_recv(struct tevent_req *req, int *perrno, TALLOC_CTX *mem_ctx, struct tstream_context **stream, + struct tsocket_address **local, const char *location); -#define tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream) \ - _tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream, \ +#define tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream, local) \ + _tstream_inet_tcp_connect_recv(req, perrno, mem_ctx, stream, local, \ __location__) #endif diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c index f544e8672e..019bf4266b 100644 --- a/lib/tsocket/tsocket_bsd.c +++ b/lib/tsocket/tsocket_bsd.c @@ -2302,10 +2302,11 @@ int _tstream_inet_tcp_connect_recv(struct tevent_req *req, int *perrno, TALLOC_CTX *mem_ctx, struct tstream_context **stream, + struct tsocket_address **local, const char *location) { return tstream_bsd_connect_recv(req, perrno, - mem_ctx, stream, NULL, + mem_ctx, stream, local, location); } diff --git a/source4/libcli/wrepl/winsrepl.c b/source4/libcli/wrepl/winsrepl.c index 83da21700c..842a35175e 100644 --- a/source4/libcli/wrepl/winsrepl.c +++ b/source4/libcli/wrepl/winsrepl.c @@ -248,7 +248,7 @@ static void wrepl_connect_done(struct tevent_req *subreq) int sys_errno; ret = tstream_inet_tcp_connect_recv(subreq, &sys_errno, - state, &state->stream); + state, &state->stream, NULL); if (ret != 0) { NTSTATUS status = map_nt_error_from_unix(sys_errno); tevent_req_nterror(req, status); |