diff options
author | Julius Bünger <buenger@mytum.de> | 2015-07-23 18:21:49 +0000 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2015-07-23 18:21:49 +0000 |
commit | ff073fe2f2c6a0fe0532061533c570acfba60e7d (patch) | |
tree | 43bd8220c5414f04ba20ec8362e1cc2cd15057a4 /src/rps/gnunet-service-rps_sampler_elem.c | |
parent | 66fa52570d0d9f29d8b6bf8bd4667c18931b3806 (diff) | |
download | gnunet-ff073fe2f2c6a0fe0532061533c570acfba60e7d.tar.gz gnunet-ff073fe2f2c6a0fe0532061533c570acfba60e7d.zip |
get perfect sample of each sampler element
Diffstat (limited to 'src/rps/gnunet-service-rps_sampler_elem.c')
-rw-r--r-- | src/rps/gnunet-service-rps_sampler_elem.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/rps/gnunet-service-rps_sampler_elem.c b/src/rps/gnunet-service-rps_sampler_elem.c index 16b9cb39e..5354c8081 100644 --- a/src/rps/gnunet-service-rps_sampler_elem.c +++ b/src/rps/gnunet-service-rps_sampler_elem.c | |||
@@ -166,4 +166,26 @@ RPS_sampler_elem_next (struct RPS_SamplerElement *s_elem, | |||
166 | GNUNET_i2s_full (&s_elem->peer_id)); | 166 | GNUNET_i2s_full (&s_elem->peer_id)); |
167 | } | 167 | } |
168 | 168 | ||
169 | /** | ||
170 | * Initialise the min-wise independent function of the given sampler element. | ||
171 | * | ||
172 | * @param s_elem the sampler element | ||
173 | * @param auth_key the key to use | ||
174 | */ | ||
175 | void | ||
176 | RPS_sampler_elem_set (struct RPS_SamplerElement *s_elem, | ||
177 | struct GNUNET_CRYPTO_AuthKey auth_key) | ||
178 | { | ||
179 | s_elem->auth_key = auth_key; | ||
180 | |||
181 | #ifdef TO_FILE | ||
182 | /* Create a file(-name) to store internals to */ | ||
183 | char *name_buf; | ||
184 | name_buf = auth_key_to_string (s_elem->auth_key); | ||
185 | |||
186 | s_elem->file_name = create_file (name_buf); | ||
187 | GNUNET_free (name_buf); | ||
188 | #endif /* TO_FILE */ | ||
189 | } | ||
190 | |||
169 | /* end of gnunet-service-rps.c */ | 191 | /* end of gnunet-service-rps.c */ |