|
|
@ -2338,7 +2338,7 @@ out: |
|
|
|
|
|
|
|
|
|
|
|
static void getproxy(sdata_t *sdata, const char *buf, int *sockd) |
|
|
|
static void getproxy(sdata_t *sdata, const char *buf, int *sockd) |
|
|
|
{ |
|
|
|
{ |
|
|
|
proxy_t *proxy; |
|
|
|
proxy_t *proxy, *parent; |
|
|
|
json_error_t err_val; |
|
|
|
json_error_t err_val; |
|
|
|
json_t *val = NULL; |
|
|
|
json_t *val = NULL; |
|
|
|
int id, subid = 0; |
|
|
|
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); |
|
|
|
val = json_errormsg("Failed to find proxy %d:%d", id, subid); |
|
|
|
goto out; |
|
|
|
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}", |
|
|
|
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, |
|
|
|
"diff", proxy->diff, "url", proxy->url, "auth", proxy->auth, "pass", proxy->pass, |
|
|
|
"enonce1", proxy->enonce1, "enonce1constlen", proxy->enonce1constlen, |
|
|
|
"enonce1", proxy->enonce1, "enonce1constlen", proxy->enonce1constlen, |
|
|
|
"enonce1varlen", proxy->enonce1varlen, "nonce2len", proxy->nonce2len, |
|
|
|
"enonce1varlen", proxy->enonce1varlen, "nonce2len", proxy->nonce2len, |
|
|
|
"enonce2varlen", proxy->enonce2varlen, "subscribed", proxy->subscribed, |
|
|
|
"enonce2varlen", proxy->enonce2varlen, "subscribed", proxy->subscribed, |
|
|
|
"notified", proxy->notified, "clients", proxy->clients, "max_clients", proxy->max_clients, |
|
|
|
"notified", proxy->notified, "clients", proxy->clients, "max_clients", proxy->max_clients, |
|
|
|
"bound_clients", proxy->bound_clients, "combined_clients", proxy->combined_clients, |
|
|
|
"bound_clients", proxy->bound_clients, "combined_clients", parent->combined_clients, |
|
|
|
"headroom", proxy->headroom, "subproxy_count", proxy->subproxy_count, |
|
|
|
"headroom", proxy->headroom, "subproxy_count", parent->subproxy_count, |
|
|
|
"dead", proxy->dead); |
|
|
|
"dead", proxy->dead); |
|
|
|
out: |
|
|
|
out: |
|
|
|
send_api_response(val, *sockd); |
|
|
|
send_api_response(val, *sockd); |
|
|
|