|
|
@ -1317,6 +1317,14 @@ static void *do_update(void *arg) |
|
|
|
rename_proc("updater"); |
|
|
|
rename_proc("updater"); |
|
|
|
|
|
|
|
|
|
|
|
/* Serialise access to getbase to avoid out of order new block notifies */ |
|
|
|
/* Serialise access to getbase to avoid out of order new block notifies */ |
|
|
|
|
|
|
|
if (prio < GEN_PRIORITY) { |
|
|
|
|
|
|
|
/* Don't queue another routine update if one is already in
|
|
|
|
|
|
|
|
* progress. */ |
|
|
|
|
|
|
|
if (cksem_trywait(&sdata->update_sem)) { |
|
|
|
|
|
|
|
LOGINFO("Skipped lowprio update base"); |
|
|
|
|
|
|
|
goto out_free; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else |
|
|
|
cksem_wait(&sdata->update_sem); |
|
|
|
cksem_wait(&sdata->update_sem); |
|
|
|
retry: |
|
|
|
retry: |
|
|
|
buf = send_recv_generator(ckp, "getbase", prio); |
|
|
|
buf = send_recv_generator(ckp, "getbase", prio); |
|
|
@ -1379,6 +1387,7 @@ out: |
|
|
|
broadcast_ping(sdata); |
|
|
|
broadcast_ping(sdata); |
|
|
|
} |
|
|
|
} |
|
|
|
dealloc(buf); |
|
|
|
dealloc(buf); |
|
|
|
|
|
|
|
out_free: |
|
|
|
free(ur->pth); |
|
|
|
free(ur->pth); |
|
|
|
free(ur); |
|
|
|
free(ur); |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|