- if (size != sizeof(sessiont) ) { // Ouch! Very very bad!
- LOG(0, 0, 0, "DANGER: Received a CSESSION that didn't decompress correctly!\n");
- // Now what? Should exit! No-longer up to date!
- break;
+ if (size != sizeof(sessiont)) { // Ouch! Very very bad!
+ if ((hb_ver < HB_VERSION) && (size < sizeof(sessiont)))
+ {
+ // set to 0 the unused variables
+ memset(&c[size], 0, (sizeof(sessiont) - size));
+ LOG(3, 0, 0, "WARNING: Received a CSESSION from %s hb_version %d != %d current version !\n", fmtaddr(addr, 2), hb_ver, HB_VERSION);
+ // New feature not activated until the master has not been upgraded.
+ }
+ else
+ {
+ LOG(0, 0, 0, "DANGER: Received a CSESSION that didn't decompress correctly!\n");
+ // Now what? Should exit! No-longer up to date!
+ break;
+ }