Skip to content
Snippets Groups Projects
Commit f362c8f7 authored by Alessio Igor Bogani's avatar Alessio Igor Bogani
Browse files

Fix for the ReadUntil()

parent 1bf6f295
No related branches found
No related tags found
No related merge requests found
......@@ -610,14 +610,18 @@ Tango::DevVarCharArray *Socket2::read_until(const Tango::DevVarCharArray *argin)
char delim = (*argin)[0];
size_t pos = 0, dsize;
bool found = false;
do {
dsize = data.size();
for (; pos < dsize; ++pos) {
if (memcmp(&data[pos], &delim, 1) == 0) {
found = true;
break;
}
}
if (found)
break;
_read(dsize + 1);
} while (true);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment