From 49e619c1cf7ed62334263a89eb031899bc2e7178 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 11 Apr 2012 12:50:50 -0400 Subject: Rename *_isin to *_contains This is an automatically generated commit, from the following perl script, run with the options "-w -i -p". s/smartlist_string_num_isin/smartlist_contains_int_as_string/g; s/smartlist_string_isin((?:_case)?)/smartlist_contains_string$1/g; s/smartlist_digest_isin/smartlist_contains_digest/g; s/smartlist_isin/smartlist_contains/g; s/digestset_isin/digestset_contains/g; --- src/or/rendservice.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/or/rendservice.c') diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 6da9ba4698..7d4f6fa5d4 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -931,7 +931,7 @@ rend_service_requires_uptime(rend_service_t *service) for (i=0; i < smartlist_len(service->ports); ++i) { p = smartlist_get(service->ports, i); - if (smartlist_string_num_isin(get_options()->LongLivedPorts, + if (smartlist_contains_int_as_string(get_options()->LongLivedPorts, p->virtual_port)) return 1; } @@ -2774,7 +2774,7 @@ directory_post_to_hs_dir(rend_service_descriptor_t *renddesc, char *hs_dir_ip; const node_t *node; hs_dir = smartlist_get(responsible_dirs, j); - if (smartlist_digest_isin(renddesc->successful_uploads, + if (smartlist_contains_digest(renddesc->successful_uploads, hs_dir->identity_digest)) /* Don't upload descriptor if we succeeded in doing so last time. */ continue; @@ -2809,7 +2809,7 @@ directory_post_to_hs_dir(rend_service_descriptor_t *renddesc, hs_dir->or_port); tor_free(hs_dir_ip); /* Remember successful upload to this router for next time. */ - if (!smartlist_digest_isin(successful_uploads, hs_dir->identity_digest)) + if (!smartlist_contains_digest(successful_uploads, hs_dir->identity_digest)) smartlist_add(successful_uploads, hs_dir->identity_digest); } smartlist_clear(responsible_dirs); @@ -2827,7 +2827,7 @@ directory_post_to_hs_dir(rend_service_descriptor_t *renddesc, if (!renddesc->successful_uploads) renddesc->successful_uploads = smartlist_new(); SMARTLIST_FOREACH(successful_uploads, const char *, c, { - if (!smartlist_digest_isin(renddesc->successful_uploads, c)) { + if (!smartlist_contains_digest(renddesc->successful_uploads, c)) { char *hsdir_id = tor_memdup(c, DIGEST_LEN); smartlist_add(renddesc->successful_uploads, hsdir_id); } -- cgit v1.2.3-54-g00ecf