The scheduler sets the first byte of the shared map to '0' while it
rewrites the data file path. Any non-zero byte was taken as a pending
update, so a request could read a partial path and emit a spurious
"invalid path" alert. '0' is now treated as no update, as the nginx
module does.
This should be backported to lower branches.
char *base;
base = (char *)global_deviceatlas.atlasmap;
- if (base[0] != 0) {
+ if (base[0] != 0 && base[0] != '0') {
FILE *jsonp;
void *cnew, *cold;
da_status_t status;
#ifdef USE_THREAD
if (HA_SPIN_TRYLOCK(OTHER_LOCK, &dadwsch_lock) != 0)
return;
- if (base[0] == 0) {
+ if (base[0] == 0 || base[0] == '0') {
HA_SPIN_UNLOCK(OTHER_LOCK, &dadwsch_lock);
return;
}