diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-01-20 20:18:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-01-20 20:18:32 +0000 |
commit | fd41cbcadf93698f1e07343d82b92863671f0542 (patch) | |
tree | 5658a0157981022790bc09eaea6e55fd49994180 /src/or/test.c | |
parent | 362d89fb6292390654b818cd0dc8e83d1e76bd6f (diff) | |
download | tor-fd41cbcadf93698f1e07343d82b92863671f0542.tar.gz tor-fd41cbcadf93698f1e07343d82b92863671f0542.zip |
Have reason string for serverdesc post requests contain actual serverdesc status. Also fix return values of dirserv_add_descriptor to work as advertised.
svn:r3391
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/test.c b/src/or/test.c index 632968ba2a..6fad24af7a 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -998,6 +998,7 @@ test_dir_format(void) routerlist_t *dir1 = NULL, *dir2 = NULL; tor_version_t ver1; char *bw_lines = NULL; + const char *m; test_assert( (pk1 = crypto_new_pk_env()) ); test_assert( (pk2 = crypto_new_pk_env()) ); @@ -1158,10 +1159,10 @@ test_dir_format(void) r2.published_on = time(NULL)-3*60*60; test_assert(router_dump_router_to_string(buf, 2048, &r1, pk2)>0); cp = buf; - test_eq(dirserv_add_descriptor((const char**)&cp), 1); + test_eq(dirserv_add_descriptor((const char**)&cp,&m), 1); test_assert(router_dump_router_to_string(buf, 2048, &r2, pk1)>0); cp = buf; - test_eq(dirserv_add_descriptor((const char**)&cp), 1); + test_eq(dirserv_add_descriptor((const char**)&cp,&m), 1); get_options()->Nickname = tor_strdup("DirServer"); test_assert(!dirserv_dump_directory_to_string(&cp,pk3)); test_assert(!router_parse_routerlist_from_directory(cp, &dir1, pk3, 1, 0)); |