diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-09-04 11:00:31 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-12-15 15:26:05 +0100 |
commit | e08c324fc5ed9d7d4970fc7a7b6b13bff38ace59 (patch) | |
tree | 7b6553d2ccc3735096caa5a24188a23e0dcf06ab /source3 | |
parent | c0ac1cebfbf7b562bad368b14d8004495a59e574 (diff) | |
download | samba-e08c324fc5ed9d7d4970fc7a7b6b13bff38ace59.tar.gz samba-e08c324fc5ed9d7d4970fc7a7b6b13bff38ace59.tar.bz2 samba-e08c324fc5ed9d7d4970fc7a7b6b13bff38ace59.zip |
s3:libsmb: add tstream_is_cli_np()
metze
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/cli_np_tstream.c | 13 | ||||
-rw-r--r-- | source3/libsmb/cli_np_tstream.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/libsmb/cli_np_tstream.c b/source3/libsmb/cli_np_tstream.c index 814dba8c8f..aa5806bba8 100644 --- a/source3/libsmb/cli_np_tstream.c +++ b/source3/libsmb/cli_np_tstream.c @@ -191,6 +191,19 @@ static ssize_t tstream_cli_np_pending_bytes(struct tstream_context *stream) return cli_nps->read.left; } +bool tstream_is_cli_np(struct tstream_context *stream) +{ + struct tstream_cli_np *cli_nps = + talloc_get_type(_tstream_context_data(stream), + struct tstream_cli_np); + + if (!cli_nps) { + return false; + } + + return true; +} + struct tstream_cli_np_writev_state { struct tstream_context *stream; struct tevent_context *ev; diff --git a/source3/libsmb/cli_np_tstream.h b/source3/libsmb/cli_np_tstream.h index 4808db6390..c6f5231f81 100644 --- a/source3/libsmb/cli_np_tstream.h +++ b/source3/libsmb/cli_np_tstream.h @@ -44,4 +44,6 @@ NTSTATUS _tstream_cli_np_existing(TALLOC_CTX *mem_ctx, #define tstream_cli_np_existing(mem_ctx, cli, npipe, stream) \ _tstream_cli_np_existing(mem_ctx, cli, npipe, stream, __location__) +bool tstream_is_cli_np(struct tstream_context *stream); + #endif /* _CLI_NP_TSTREAM_H_ */ |