Incorrect fallthrough in memcached_behavior_set for REMOVE_FAILED_SERVERS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmemcached |
New
|
Undecided
|
Unassigned |
Bug Description
memcached_
case MEMCACHED_
ptr-
case MEMCACHED_
if (data == 0)
{
return memcached_
}
ptr-
break;
Having zero data for the first is perfectly valid (it means "don't remove failed servers,"), when when we fall through, it causes an error. There should be a "break" at the end of that first case block.
There's a corresponding problem in memcached_ behavior_ get:
case MEMCACHED_ BEHAVIOR_ REMOVE_ FAILED_ SERVERS: BEHAVIOR_ SERVER_ FAILURE_ LIMIT: failure_ limit;
case MEMCACHED_
return ptr->server_
should read:
case MEMCACHED_ BEHAVIOR_ REMOVE_ FAILED_ SERVERS: auto_eject_ hosts;
return ptr->flags.
case MEMCACHED_ BEHAVIOR_ SERVER_ FAILURE_ LIMIT: failure_ limit;
return ptr->server_