mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Segfault less. Somebody needs to look over why exactly this helps. re #436
svn:r10376
This commit is contained in:
parent
7ba1d9f3c8
commit
3425f2c11f
@ -1960,7 +1960,7 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers,
|
||||
|
||||
if (authdir_mode_handles_descs(options) &&
|
||||
!strcmp(url,"/tor/")) { /* server descriptor post */
|
||||
const char *msg;
|
||||
const char *msg = NULL;
|
||||
int r = dirserv_add_multiple_descriptors(body, &msg);
|
||||
tor_assert(msg);
|
||||
if (r > 0)
|
||||
|
@ -528,6 +528,7 @@ dirserv_add_multiple_descriptors(const char *desc, const char **msg)
|
||||
list = smartlist_create();
|
||||
if (!router_parse_list_from_string(&s, NULL, list, SAVED_NOWHERE, 0)) {
|
||||
SMARTLIST_FOREACH(list, routerinfo_t *, ri, {
|
||||
msg_out = NULL;
|
||||
r_tmp = dirserv_add_descriptor(ri, &msg_out);
|
||||
if (r_tmp < r) {
|
||||
r = r_tmp;
|
||||
@ -541,6 +542,7 @@ dirserv_add_multiple_descriptors(const char *desc, const char **msg)
|
||||
s = desc;
|
||||
if (!router_parse_list_from_string(&s, NULL, list, SAVED_NOWHERE, 1)) {
|
||||
SMARTLIST_FOREACH(list, extrainfo_t *, ei, {
|
||||
msg_out = NULL;
|
||||
r_tmp = dirserv_add_extrainfo(ei, &msg_out);
|
||||
if (r_tmp < r) {
|
||||
r = r_tmp;
|
||||
|
Loading…
Reference in New Issue
Block a user