示例#1
0
static ns_t *ns_fromkvs (flux_t h)
{
    JSON o = NULL;
    ns_t *ns = NULL;

    if (kvs_get_obj (h, "conf.live.status", &o) < 0)
        goto done;
    ns = ns_fromjson (o);
done:
    Jput (o);
    return ns;
}
示例#2
0
static ns_t *ns_fromkvs (flux_t h)
{
    char *json_str = NULL;
    ns_t *ns = NULL;

    if (kvs_get (h, "conf.live.status", &json_str) < 0)
        goto done;
    ns = ns_fromjson (json_str);
done:
    if (json_str)
        free (json_str);
    return ns;
}