diff options
author | Christophe Genevey Metat <genevey.christophe@gmail.com> | 2016-06-27 15:34:12 +0000 |
---|---|---|
committer | Christophe Genevey Metat <genevey.christophe@gmail.com> | 2016-06-27 15:34:12 +0000 |
commit | 3a4870624812ac4286624d3946981cac6aef4e67 (patch) | |
tree | 08b05f2d1354b68a466973c177774479484cae1f /src/regex/gnunet-regex-simulation-profiler.c | |
parent | 4450e34453501e9449de830d48e1421590181ef7 (diff) | |
download | gnunet-3a4870624812ac4286624d3946981cac6aef4e67.tar.gz gnunet-3a4870624812ac4286624d3946981cac6aef4e67.zip |
add function conv param string
Diffstat (limited to 'src/regex/gnunet-regex-simulation-profiler.c')
-rw-r--r-- | src/regex/gnunet-regex-simulation-profiler.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/regex/gnunet-regex-simulation-profiler.c b/src/regex/gnunet-regex-simulation-profiler.c index e88a00749..62c768a55 100644 --- a/src/regex/gnunet-regex-simulation-profiler.c +++ b/src/regex/gnunet-regex-simulation-profiler.c | |||
@@ -316,10 +316,10 @@ do_abort (void *cls) | |||
316 | */ | 316 | */ |
317 | static void | 317 | static void |
318 | regex_iterator (void *cls, | 318 | regex_iterator (void *cls, |
319 | const struct GNUNET_HashCode *key, | 319 | const struct GNUNET_HashCode *key, |
320 | const char *proof, | 320 | const char *proof, |
321 | int accepting, | 321 | int accepting, |
322 | unsigned int num_edges, | 322 | unsigned int num_edges, |
323 | const struct REGEX_BLOCK_Edge *edges) | 323 | const struct REGEX_BLOCK_Edge *edges) |
324 | { | 324 | { |
325 | unsigned int i; | 325 | unsigned int i; |
@@ -334,7 +334,7 @@ regex_iterator (void *cls, | |||
334 | { | 334 | { |
335 | struct GNUNET_MY_QueryParam params_select[] = { | 335 | struct GNUNET_MY_QueryParam params_select[] = { |
336 | GNUNET_MY_query_param_auto_from_type (key), | 336 | GNUNET_MY_query_param_auto_from_type (key), |
337 | GNUNET_MY_query_param_fixed_size(edges[i].label, strlen (edges[i].label)), | 337 | GNUNET_MY_query_param_string (edges[i].label), |
338 | GNUNET_MY_query_param_end | 338 | GNUNET_MY_query_param_end |
339 | }; | 339 | }; |
340 | 340 | ||
@@ -370,13 +370,14 @@ regex_iterator (void *cls, | |||
370 | 370 | ||
371 | if (-1 != total && total > 0) | 371 | if (-1 != total && total > 0) |
372 | { | 372 | { |
373 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Total: %llu (%s, %s)\n", (unsigned long long)total, | 373 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Total: %llu (%s, %s)\n", |
374 | (unsigned long long)total, | ||
374 | GNUNET_h2s (key), edges[i].label); | 375 | GNUNET_h2s (key), edges[i].label); |
375 | } | 376 | } |
376 | 377 | ||
377 | struct GNUNET_MY_QueryParam params_stmt[] = { | 378 | struct GNUNET_MY_QueryParam params_stmt[] = { |
378 | GNUNET_MY_query_param_auto_from_type (&key), | 379 | GNUNET_MY_query_param_auto_from_type (&key), |
379 | GNUNET_MY_query_param_fixed_size (edges[i].label, strlen (edges[i].label)), | 380 | GNUNET_MY_query_param_string (edges[i].label), |
380 | GNUNET_MY_query_param_auto_from_type (&edges[i].destination), | 381 | GNUNET_MY_query_param_auto_from_type (&edges[i].destination), |
381 | GNUNET_MY_query_param_uint32 (&iaccepting), | 382 | GNUNET_MY_query_param_uint32 (&iaccepting), |
382 | GNUNET_MY_query_param_end | 383 | GNUNET_MY_query_param_end |
@@ -392,8 +393,12 @@ regex_iterator (void *cls, | |||
392 | char *key_str = GNUNET_strdup (GNUNET_h2s (key)); | 393 | char *key_str = GNUNET_strdup (GNUNET_h2s (key)); |
393 | char *to_key_str = GNUNET_strdup (GNUNET_h2s (&edges[i].destination)); | 394 | char *to_key_str = GNUNET_strdup (GNUNET_h2s (&edges[i].destination)); |
394 | 395 | ||
395 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Merged (%s, %s, %s, %i)\n", key_str, | 396 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Merged (%s, %s, %s, %i)\n", |
396 | edges[i].label, to_key_str, accepting); | 397 | key_str, |
398 | edges[i].label, | ||
399 | to_key_str, | ||
400 | accepting); | ||
401 | |||
397 | GNUNET_free (key_str); | 402 | GNUNET_free (key_str); |
398 | GNUNET_free (to_key_str); | 403 | GNUNET_free (to_key_str); |
399 | num_merged_transitions++; | 404 | num_merged_transitions++; |
@@ -416,7 +421,7 @@ regex_iterator (void *cls, | |||
416 | { | 421 | { |
417 | struct GNUNET_MY_QueryParam params_stmt[] = { | 422 | struct GNUNET_MY_QueryParam params_stmt[] = { |
418 | GNUNET_MY_query_param_auto_from_type (key), | 423 | GNUNET_MY_query_param_auto_from_type (key), |
419 | GNUNET_MY_query_param_fixed_size (NULL, 0), | 424 | GNUNET_MY_query_param_string (""), |
420 | GNUNET_MY_query_param_auto_from_type (NULL), | 425 | GNUNET_MY_query_param_auto_from_type (NULL), |
421 | GNUNET_MY_query_param_uint32 (&iaccepting), | 426 | GNUNET_MY_query_param_uint32 (&iaccepting), |
422 | GNUNET_MY_query_param_end | 427 | GNUNET_MY_query_param_end |