- while (in_buffer.find("\n") != std::string::npos)
- {
- std::string ret = in_buffer.substr(0,in_buffer.find("\n")-1);
- in_buffer = in_buffer.substr(in_buffer.find("\n")+1,in_buffer.length()-in_buffer.find("\n"));
- /* Use rfind here not find, as theres more
- * chance of the \r being near the end of the
- * string, not the start.
- */
- if (ret.find("\r") != std::string::npos)
- ret = in_buffer.substr(0,in_buffer.find("\r")-1);
- /* Process this one, abort if it
- * didnt return true.
- */
- if (!this->ProcessLine(ret))
- {
- return false;
- }
- }
- Utils->Creator->loopCall = false;
- return true;
+ if (ret.find("\r") != std::string::npos)
+ ret = recvq.substr(0,recvq.find("\r")-1);
+ ProcessLine(ret);