1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

20 Commits

Author SHA1 Message Date
Volker Lendecke
f6c9e2800e rpc_client: Replace ZERO_STRUCTP with struct assignment
Give the compiler simpler hints

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-06 17:22:30 +00:00
Stefan Metzmacher
cc7b909b8b s3:rpclient: simplify rpc_tstream_next_vector()
We always now how many bytes our caller requires,
so there's no need to use tstream_pending_bytes().

This makes it possible to read socket_wrapper generated
captures again, as wireshark requires the fixed (16 bytes) DCERPC
header to be in one TCP packet.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2020-02-06 14:57:41 +00:00
Stefan Metzmacher
0059929601 libcli/smb: s/tstream_cli_np/tstream_smbXcli_np
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:42 +01:00
Stefan Metzmacher
024fc73047 libcli/smb: move source3/libsmb/cli_np_tstream.c to tstream_smbXcli_np.c
This code is generic enough to have it in the top level now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:42 +01:00
Andreas Schneider
5990de5d89 s3-rpc_client: Make data pointer const in trans_send().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 30 01:32:08 CET 2013 on sn-devel-104
2013-10-30 01:32:08 +01:00
Gregor Beck
1974dbe30c s3:rpc_client: remove unused rpc_pipe_np_smb_conn()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:50 +13:00
Stefan Metzmacher
f9d0473d02 s3:rpc_client: s/struct event_context/struct tevent_context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:52 +01:00
Andreas Schneider
a866dcc4f6 s3-rpc: Return the correct ntstatus depending on the transport. 2012-07-06 10:00:57 +02:00
Stefan Metzmacher
cc5f973884 s3:rpc_client: return NT_STATUS_CONNECTION_DISCONNECTED
We should return the same in all places
and don't mix NT_STATUS_INVALID_CONNECTION and NT_STATUS_CONNECTION_INVALID.

metze
2011-09-14 18:03:17 +02:00
Stefan Metzmacher
56319cf1b7 s3:rpc_transport_tstream: only use tstream_cli_np_use_trans() for sync requests
Currently the caller doesn't cope with multiple async requests anyway,
so this is just protection for the future.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug  5 22:31:12 CEST 2011 on sn-devel-104
2011-08-05 22:31:12 +02:00
Stefan Metzmacher
a833aaf52c s3:rpc_transport_tstream: call tstream_cli_np_use_trans() before tstream_writev_queue_send()
This will be needed when tstream_writev_queue_send() changes it's behavior and
avoids using an immediate event when the queue is empty.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Aug  1 14:55:00 CEST 2011 on sn-devel-104
2011-08-01 14:55:00 +02:00
Rusty Russell
56e72337b0 lib/util/time.c: timeval_current_ofs_msec
Several places want "milliseconds from current time", and several were
simply doing "msec * 1000" which can (and does in one place) result in
a usec value over 1 a million.

Using a helper to do this is safer and more readable.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Günther Deschner
50883cfeb4 s3-tevent: only include ../lib/util/tevent wrappers where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-29 14:00:30 +02:00
Günther Deschner
64b664155b s3-rpc_client: move rpc_cli_transport structs and protos to rpc_transport.h
Guenther
2011-04-12 12:20:43 +02:00
Andreas Schneider
bf18403c81 s3-rpc_client: Move client pipe functions to own header. 2011-02-28 18:15:04 +01:00
Stefan Metzmacher
8b47fcea04 s3:rpc_client: implement rpc_transport_np_init() on top of rpc_transport_tstream_init()
This also makes use of tstream_cli_np_open() to get the tstream.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Dec 15 16:12:30 CET 2010 on sn-devel-104
2010-12-15 16:12:30 +01:00
Stefan Metzmacher
122dc1e213 s3:rpc_client/rpc_transport_tstream.c: add some logic to handle cli_np tstreams
metze
2010-12-15 15:26:05 +01:00
Stefan Metzmacher
9a14dace22 s3:rpc_client/rpc_transport_tstream: timeout should be unsigned int
metze
2010-12-15 15:26:05 +01:00
Stefan Metzmacher
e55426fe79 s3:rpc_client: let rpc_transport_tstream_init() create read and write queue
metze
2010-12-15 15:26:05 +01:00
Simo Sorce
7b1748d959 s3-rpc_client: Added a tstream based transport.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00