/* called when a getoffline completes */ static void getoffline_callback(struct smbcli_request *req) { struct offline_state *state = req->async.private_data; NTSTATUS status; union smb_fileinfo io; io.getattr.level = RAW_FILEINFO_GETATTR; status = smb_raw_pathinfo_recv(req, state->mem_ctx, &io); if (!NT_STATUS_IS_OK(status)) { printf("Failed to get offline file '%s' - %s\n", state->fname, nt_errstr(status)); test_failed++; } if (io.getattr.out.attrib & FILE_ATTRIBUTE_OFFLINE) { state->offline_count++; } else { state->online_count++; } state->req = NULL; state->count++; if (!test_finished) { test_offline(state); } }
/* a handler for async qpathinfo replies */ static void async_qpathinfo(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_pathinfo_recv(c_req, req, async->parms); talloc_free(async); req->async_states->send_fn(req); }