mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
connection::actions(): Do not require tick prefix during negotiation
This commit is contained in:
parent
cf5586c35f
commit
407daec822
1 changed files with 9 additions and 6 deletions
|
@ -113,14 +113,17 @@ connection::actions(int tick_id, class agent *agent)
|
||||||
int nlofs = in_buf.find("\r\n");
|
int nlofs = in_buf.find("\r\n");
|
||||||
std::string line = in_buf.substr(0, nlofs);
|
std::string line = in_buf.substr(0, nlofs);
|
||||||
in_buf.erase(0, nlofs + 2);
|
in_buf.erase(0, nlofs + 2);
|
||||||
|
int spofs;
|
||||||
|
|
||||||
int spofs = line.find(' ');
|
if (!negotiation) {
|
||||||
std::string cmd_tick_id = line.substr(0, spofs);
|
spofs = line.find(' ');
|
||||||
line.erase(0, spofs + 1);
|
std::string cmd_tick_id = line.substr(0, spofs);
|
||||||
|
line.erase(0, spofs + 1);
|
||||||
|
|
||||||
if (atol(cmd_tick_id.c_str()) != tick_id - 1) {
|
if (atol(cmd_tick_id.c_str()) != tick_id - 1) {
|
||||||
/* Out of sync command, ignore and continue. */
|
/* Out of sync command, ignore and continue. */
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spofs = line.find(' ');
|
spofs = line.find(' ');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue