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.
master
Nat Goodspeed 2012-03-02 14:54:24 -05:00
parent d09d4e1a7e
commit e8f463ef7a
1 changed files with 1 additions and 4 deletions

View File

@ -230,10 +230,7 @@ public:
// childout (well, up to a max length) to log what was wrong.
LLProcess::ReadPipe::size_type
readlen((std::min)(childout.size(), LLProcess::ReadPipe::size_type(80)));
std::vector<char> buffer(readlen + 1);
childstream.read(&buffer[0], readlen);
buffer[childstream.gcount()] = '\0';
bad_protocol(STRINGIZE(expect << char(colon) << &buffer[0]));
bad_protocol(STRINGIZE(expect << char(colon) << childout.read(readlen)));
}
else
{