Loading changes/bug21703 0 → 100644 +4 −0 Original line number Diff line number Diff line o Minor features (controller): - Warn the first time that a controller requests data in the long-deprecated 'GETINFO network-status' format. Closes ticket 21703. src/or/control.c +6 −0 Original line number Diff line number Diff line Loading @@ -2047,6 +2047,12 @@ getinfo_helper_dir(control_connection_t *control_conn, } } } else if (!strcmp(question, "network-status")) { /* v1 */ static int network_status_warned = 0; if (!network_status_warned) { log_warn(LD_CONTROL, "GETINFO network-status is deprecated; it will " "go away in a future version of Tor."); network_status_warned = 1; } routerlist_t *routerlist = router_get_routerlist(); if (!routerlist || !routerlist->routers || list_server_status_v1(routerlist->routers, answer, 1) < 0) { Loading src/or/dirserv.c +6 −0 Original line number Diff line number Diff line Loading @@ -814,6 +814,9 @@ directory_remove_invalid(void) * Allocate and return a description of the status of the server <b>desc</b>, * for use in a v1-style router-status line. The server is listed * as running iff <b>is_live</b> is true. * * This is deprecated: it's only used for controllers that want outputs in * the old format. */ static char * list_single_server_status(const routerinfo_t *desc, int is_live) Loading Loading @@ -926,6 +929,9 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now) * *<b>router_status_out</b>. Return 0 on success, -1 on failure. * * If for_controller is true, include the routers with very old descriptors. * * This is deprecated: it's only used for controllers that want outputs in * the old format. */ int list_server_status_v1(smartlist_t *routers, char **router_status_out, Loading Loading
changes/bug21703 0 → 100644 +4 −0 Original line number Diff line number Diff line o Minor features (controller): - Warn the first time that a controller requests data in the long-deprecated 'GETINFO network-status' format. Closes ticket 21703.
src/or/control.c +6 −0 Original line number Diff line number Diff line Loading @@ -2047,6 +2047,12 @@ getinfo_helper_dir(control_connection_t *control_conn, } } } else if (!strcmp(question, "network-status")) { /* v1 */ static int network_status_warned = 0; if (!network_status_warned) { log_warn(LD_CONTROL, "GETINFO network-status is deprecated; it will " "go away in a future version of Tor."); network_status_warned = 1; } routerlist_t *routerlist = router_get_routerlist(); if (!routerlist || !routerlist->routers || list_server_status_v1(routerlist->routers, answer, 1) < 0) { Loading
src/or/dirserv.c +6 −0 Original line number Diff line number Diff line Loading @@ -814,6 +814,9 @@ directory_remove_invalid(void) * Allocate and return a description of the status of the server <b>desc</b>, * for use in a v1-style router-status line. The server is listed * as running iff <b>is_live</b> is true. * * This is deprecated: it's only used for controllers that want outputs in * the old format. */ static char * list_single_server_status(const routerinfo_t *desc, int is_live) Loading Loading @@ -926,6 +929,9 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now) * *<b>router_status_out</b>. Return 0 on success, -1 on failure. * * If for_controller is true, include the routers with very old descriptors. * * This is deprecated: it's only used for controllers that want outputs in * the old format. */ int list_server_status_v1(smartlist_t *routers, char **router_status_out, Loading