/* a handler for async read replies */ static void async_read(struct smbcli_request *c_req) { struct async_info *async = c_req->async.private_data; struct ntvfs_request *req = async->req; req->async_states->status = smb_raw_read_recv(c_req, async->parms); talloc_free(async); req->async_states->send_fn(req); }
static void async_read_recv(struct smbcli_request *req) { struct async_context *c = req->async.private; NTSTATUS status; status = smb_raw_read_recv(req, c->io_read); c->rreq = NULL; if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("ERROR: smb_raw_read_recv - %s\n", nt_errstr(status))); if (c->cb_error) c->cb_error(c->cb_ctx, ASYNC_READ_RECV, status); return; } if (c->cb_read) c->cb_read(c->cb_ctx, c->buffer, c->io_read->readx.out.nread); async_read(c); }
/**************************************************************************** low level read operation (sync interface) ****************************************************************************/ _PUBLIC_ NTSTATUS smb_raw_read(struct smbcli_tree *tree, union smb_read *parms) { struct smbcli_request *req = smb_raw_read_send(tree, parms); return smb_raw_read_recv(req, parms); }