diff options
author | Volker Lendecke <vl@samba.org> | 2009-04-05 20:18:45 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-04-06 21:32:06 +0200 |
commit | 8bdac3615a255f65665939bda070c1b4ba93b908 (patch) | |
tree | 65db8605b74725828021c837a1c47ad513a82715 /source3/libsmb/clientgen.c | |
parent | ad29104d3df85faa946f10c0d8626cfc993010e5 (diff) | |
download | samba-8bdac3615a255f65665939bda070c1b4ba93b908.tar.gz samba-8bdac3615a255f65665939bda070c1b4ba93b908.tar.xz samba-8bdac3615a255f65665939bda070c1b4ba93b908.zip |
Add new async libsmb infrastructure
I know this is just yet another iteration, but I like this one much better than
the one that exists right now :-)
It will do trans and echo requests without a _recv helper and without
unnecessary memcpy().
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r-- | source3/libsmb/clientgen.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 6186387076e..450a7cf4cd4 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -650,6 +650,12 @@ struct cli_state *cli_initialise_ex(int signing_state) goto error; } + cli->outgoing = tevent_queue_create(cli, "cli_outgoing"); + if (cli->outgoing == NULL) { + goto error; + } + cli->pending = NULL; + cli->initialised = 1; return cli; @@ -740,6 +746,12 @@ void cli_shutdown(struct cli_state *cli) cli->fd = -1; cli->smb_rw_error = SMB_READ_OK; + /* + * Need to free pending first, they remove themselves + */ + while (cli->pending) { + talloc_free(cli->pending[0]); + } TALLOC_FREE(cli); } |