Skip to content
Snippets Groups Projects
Commit e8f463ef authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

Use LLProcess::ReadPipe::read() in LLLeap.

The code was using LLProcess::ReadPipe::get_istream().read(), but that's much
uglier, as it requires constructing a char* buffer etc. etc.
parent d09d4e1a
No related branches found
No related tags found
No related merge requests found
...@@ -230,10 +230,7 @@ class LLLeapImpl: public LLLeap ...@@ -230,10 +230,7 @@ class LLLeapImpl: public LLLeap
// childout (well, up to a max length) to log what was wrong. // childout (well, up to a max length) to log what was wrong.
LLProcess::ReadPipe::size_type LLProcess::ReadPipe::size_type
readlen((std::min)(childout.size(), LLProcess::ReadPipe::size_type(80))); readlen((std::min)(childout.size(), LLProcess::ReadPipe::size_type(80)));
std::vector<char> buffer(readlen + 1); bad_protocol(STRINGIZE(expect << char(colon) << childout.read(readlen)));
childstream.read(&buffer[0], readlen);
buffer[childstream.gcount()] = '\0';
bad_protocol(STRINGIZE(expect << char(colon) << &buffer[0]));
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment