diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-12-11 19:27:34 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-12-11 19:27:34 +0100 |
commit | c1dd4d02762d51d1ac4078407cda2796aff8faf4 (patch) | |
tree | 612004af9190770e9c75235005873c92afc862c4 /src/arm | |
parent | b362752b69f705754327dfb7e025260d97289ad9 (diff) | |
download | gnunet-c1dd4d02762d51d1ac4078407cda2796aff8faf4.tar.gz gnunet-c1dd4d02762d51d1ac4078407cda2796aff8faf4.zip |
cache NICK results in namestore to avoid unnecessary load on the DB; improve sqlite DB style, use WAL for sqlite DB
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/gnunet-arm.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index 28d1f7592..fa0374bc5 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -74,7 +74,7 @@ static char *term; | |||
74 | /** | 74 | /** |
75 | * Set to the name of the config file used. | 75 | * Set to the name of the config file used. |
76 | */ | 76 | */ |
77 | static const char *config_file; | 77 | static char *config_file; |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Set to the directory where runtime files are stored. | 80 | * Set to the directory where runtime files are stored. |
@@ -172,6 +172,7 @@ delete_files () | |||
172 | static void | 172 | static void |
173 | shutdown_task (void *cls) | 173 | shutdown_task (void *cls) |
174 | { | 174 | { |
175 | (void) cls; | ||
175 | if (NULL != al_task) | 176 | if (NULL != al_task) |
176 | { | 177 | { |
177 | GNUNET_SCHEDULER_cancel (al_task); | 178 | GNUNET_SCHEDULER_cancel (al_task); |
@@ -284,6 +285,7 @@ conn_status (void *cls, | |||
284 | { | 285 | { |
285 | static int once; | 286 | static int once; |
286 | 287 | ||
288 | (void) cls; | ||
287 | if ( (GNUNET_SYSERR == connected) && | 289 | if ( (GNUNET_SYSERR == connected) && |
288 | (0 == once) ) | 290 | (0 == once) ) |
289 | { | 291 | { |
@@ -312,6 +314,7 @@ start_callback (void *cls, | |||
312 | enum GNUNET_ARM_RequestStatus rs, | 314 | enum GNUNET_ARM_RequestStatus rs, |
313 | enum GNUNET_ARM_Result result) | 315 | enum GNUNET_ARM_Result result) |
314 | { | 316 | { |
317 | (void) cls; | ||
315 | op = NULL; | 318 | op = NULL; |
316 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 319 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
317 | { | 320 | { |
@@ -355,6 +358,7 @@ stop_callback (void *cls, | |||
355 | { | 358 | { |
356 | char *msg; | 359 | char *msg; |
357 | 360 | ||
361 | (void) cls; | ||
358 | op = NULL; | 362 | op = NULL; |
359 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 363 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
360 | { | 364 | { |
@@ -405,6 +409,7 @@ init_callback (void *cls, | |||
405 | enum GNUNET_ARM_RequestStatus rs, | 409 | enum GNUNET_ARM_RequestStatus rs, |
406 | enum GNUNET_ARM_Result result) | 410 | enum GNUNET_ARM_Result result) |
407 | { | 411 | { |
412 | (void) cls; | ||
408 | op = NULL; | 413 | op = NULL; |
409 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 414 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
410 | { | 415 | { |
@@ -452,6 +457,7 @@ term_callback (void *cls, | |||
452 | { | 457 | { |
453 | char *msg; | 458 | char *msg; |
454 | 459 | ||
460 | (void) cls; | ||
455 | op = NULL; | 461 | op = NULL; |
456 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 462 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
457 | { | 463 | { |
@@ -501,6 +507,7 @@ list_callback (void *cls, | |||
501 | { | 507 | { |
502 | unsigned int i; | 508 | unsigned int i; |
503 | 509 | ||
510 | (void) cls; | ||
504 | op = NULL; | 511 | op = NULL; |
505 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 512 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
506 | { | 513 | { |
@@ -538,6 +545,7 @@ list_callback (void *cls, | |||
538 | static void | 545 | static void |
539 | action_loop (void *cls) | 546 | action_loop (void *cls) |
540 | { | 547 | { |
548 | (void) cls; | ||
541 | al_task = NULL; | 549 | al_task = NULL; |
542 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 550 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
543 | "Running requested actions\n"); | 551 | "Running requested actions\n"); |
@@ -637,6 +645,7 @@ srv_status (void *cls, | |||
637 | { | 645 | { |
638 | const char *msg; | 646 | const char *msg; |
639 | 647 | ||
648 | (void) cls; | ||
640 | switch (status) | 649 | switch (status) |
641 | { | 650 | { |
642 | case GNUNET_ARM_SERVICE_MONITORING_STARTED: | 651 | case GNUNET_ARM_SERVICE_MONITORING_STARTED: |
@@ -679,6 +688,7 @@ srv_status (void *cls, | |||
679 | static void | 688 | static void |
680 | timeout_task_cb (void *cls) | 689 | timeout_task_cb (void *cls) |
681 | { | 690 | { |
691 | (void) cls; | ||
682 | timeout_task = NULL; | 692 | timeout_task = NULL; |
683 | ret = 2; | 693 | ret = 2; |
684 | GNUNET_SCHEDULER_shutdown (); | 694 | GNUNET_SCHEDULER_shutdown (); |
@@ -699,8 +709,9 @@ run (void *cls, | |||
699 | const char *cfgfile, | 709 | const char *cfgfile, |
700 | const struct GNUNET_CONFIGURATION_Handle *c) | 710 | const struct GNUNET_CONFIGURATION_Handle *c) |
701 | { | 711 | { |
702 | char *armconfig; | 712 | (void) cls; |
703 | 713 | (void) args; | |
714 | (void) cfgfile; | ||
704 | cfg = GNUNET_CONFIGURATION_dup (c); | 715 | cfg = GNUNET_CONFIGURATION_dup (c); |
705 | if (GNUNET_OK != | 716 | if (GNUNET_OK != |
706 | GNUNET_CONFIGURATION_get_value_string (cfg, | 717 | GNUNET_CONFIGURATION_get_value_string (cfg, |