summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2018-10-30 13:52:34 +0100
committerJulius Bünger <buenger@mytum.de>2018-10-30 13:55:26 +0100
commitec90e2445aa5e5650bbe3274b134a5bd35ed4d39 (patch)
tree958ac0237d1efa9e8be026844f15c12645ef486d /src
parenteb369f2fb4e05d969ad1b9e2b8c03ac73dfdb32c (diff)
RPS service: Use correct file for sub
Diffstat (limited to 'src')
-rw-r--r--src/rps/gnunet-service-rps.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index cbcf00f8f..2e2fa96a7 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2814,6 +2814,25 @@ new_sub (const struct GNUNET_HashCode *hash,
"rps",
"FILENAME_VALID_PEERS");
}
+ if (0 != strncmp ("DISABLE", sub->filename_valid_peers, 7))
+ {
+ char *tmp_filename_valid_peers;
+ char str_hash[105];
+ uint32_t len_filename_valid_peers;
+
+ (void) GNUNET_snprintf (str_hash, 105, GNUNET_h2s_full (hash));
+ tmp_filename_valid_peers = GNUNET_strdup (sub->filename_valid_peers);
+ GNUNET_free (sub->filename_valid_peers);
+ len_filename_valid_peers = strlen (tmp_filename_valid_peers) + 105; /* Len of full hash + 1 */
+ sub->filename_valid_peers = GNUNET_malloc (len_filename_valid_peers);
+ strncat (sub->filename_valid_peers,
+ tmp_filename_valid_peers,
+ len_filename_valid_peers);
+ strncat (sub->filename_valid_peers,
+ str_hash,
+ len_filename_valid_peers);
+ GNUNET_free (tmp_filename_valid_peers);
+ }
sub->peer_map = GNUNET_CONTAINER_multipeermap_create (4, GNUNET_NO);
/* Set up the sampler */