Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions browser/src/client_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ std::vector<char> ReadNextMessageFromPipe(
break;
}

final_size += read;

// Reaching here means the error is "more data", that is, the buffer
// specified in ReadFile() was too small to contain the entire response
// message from the server. ReadFile() has placed the start of the
Expand Down
4 changes: 3 additions & 1 deletion demo/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ bool ParseCommandLine(int argc, char* argv[]) {
connector = content_analysis::sdk::PRINT;
} else if (connector_str == "file-transfer") {
connector = content_analysis::sdk::FILE_TRANSFER;
} else if (connector_str == "data-copied") {
connector = content_analysis::sdk::DATA_COPIED;
} else {
std::cout << "[Demo] Incorrect command line arg: " << arg << std::endl;
return false;
Expand Down Expand Up @@ -133,7 +135,7 @@ void PrintHelp() {
<< "Otherwise the content is read from a file called 'content_or_file'." << std::endl
<< "Multiple [@]content_or_file arguments may be specified, each generates one request." << std::endl
<< std::endl << "Options:" << std::endl
<< kArgConnector << "<connector> : one of 'download', 'attach' (default), 'bulk-data-entry', 'print', or 'file-transfer'" << std::endl
<< kArgConnector << "<connector> : one of 'download', 'attach' (default), 'bulk-data-entry', 'print', 'file-transfer', or 'data-copied'" << std::endl
<< kArgRequestToken << "<unique-token> : defaults to 'req-<number>' which auto increments" << std::endl
<< kArgTag << "<tag> : defaults to 'dlp'" << std::endl
<< kArgThreaded << " : handled multiple requests using threads" << std::endl
Expand Down
6 changes: 6 additions & 0 deletions demo/handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ class Handler : public content_analysis::sdk::AgentEventHandler {
case content_analysis::sdk::FILE_TRANSFER:
connector = "file-transfer";
break;
case content_analysis::sdk::DATA_COPIED:
connector = "data-copied";
break;
default:
break;
}
Expand Down Expand Up @@ -240,6 +243,9 @@ class Handler : public content_analysis::sdk::AgentEventHandler {
case content_analysis::sdk::ContentAnalysisRequest::SAVE_AS_DOWNLOAD:
reason = "SAVE_AS_DOWNLOAD";
break;
case content_analysis::sdk::ContentAnalysisRequest::CLIPBOARD_COPY:
reason = "CLIPBOARD_COPY";
break;
}
}

Expand Down