Skip to content
Snippets Groups Projects
Commit b9a8e7cd authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Workaround for zonestatus when updating timer data.

This should be properly solved by better zone fetching API with
a) refcounting b) locking.

refs #31
fixes #30
parent b867ff20
Branches
Tags
No related merge requests found
......@@ -237,7 +237,13 @@ static int remote_c_zonestatus(server_t *s, remote_cmdargs_t* a)
ret = KNOT_ENOMEM;
break;
}
if (snprintf(when, 64, "in %luh%lum%lus",
/*! Workaround until proper zone fetching API and locking
* is implemented (ref #31)
*/
if (dif.tv_sec < 0) {
const char *busy = "busy";
memcpy(when, busy, strlen(busy));
} else if (snprintf(when, 64, "in %luh%lum%lus",
dif.tv_sec/3600,
(dif.tv_sec % 3600)/60,
dif.tv_sec % 60) < 0) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment