diff --git a/src/stratifier.c b/src/stratifier.c index 6f707e7e..0b9068d8 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2338,7 +2338,7 @@ out: static void getproxy(sdata_t *sdata, const char *buf, int *sockd) { - proxy_t *proxy; + proxy_t *proxy, *parent; json_error_t err_val; json_t *val = NULL; int id, subid = 0; @@ -2361,15 +2361,16 @@ static void getproxy(sdata_t *sdata, const char *buf, int *sockd) val = json_errormsg("Failed to find proxy %d:%d", id, subid); goto out; } + parent = proxy->parent; JSON_CPACK(val, "{si,si,si,sf,ss,ss,ss,ss,si,si,si,si,sb,sb,sI,sI,sI,sI,si,sb}", - "id", proxy->id, "subid", proxy->subid, "priority", proxy->priority, + "id", proxy->id, "subid", proxy->subid, "priority", parent->priority, "diff", proxy->diff, "url", proxy->url, "auth", proxy->auth, "pass", proxy->pass, "enonce1", proxy->enonce1, "enonce1constlen", proxy->enonce1constlen, "enonce1varlen", proxy->enonce1varlen, "nonce2len", proxy->nonce2len, "enonce2varlen", proxy->enonce2varlen, "subscribed", proxy->subscribed, "notified", proxy->notified, "clients", proxy->clients, "max_clients", proxy->max_clients, - "bound_clients", proxy->bound_clients, "combined_clients", proxy->combined_clients, - "headroom", proxy->headroom, "subproxy_count", proxy->subproxy_count, + "bound_clients", proxy->bound_clients, "combined_clients", parent->combined_clients, + "headroom", proxy->headroom, "subproxy_count", parent->subproxy_count, "dead", proxy->dead); out: send_api_response(val, *sockd);