diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-07-17 20:26:02 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-07-17 20:26:02 +0000 |
commit | aabe756fa2d764481c337060d27ff03c74b9e320 (patch) | |
tree | 4f0f5222a0e8cab9d7e99ca6a0f16c6752562472 /src/identity/gnunet-service-identity.c | |
parent | 4fbefa9b5336452df611c4f02232a45caa1d0e6f (diff) | |
download | gnunet-aabe756fa2d764481c337060d27ff03c74b9e320.tar.gz gnunet-aabe756fa2d764481c337060d27ff03c74b9e320.zip |
-misc bugfixes and test-fixes
Diffstat (limited to 'src/identity/gnunet-service-identity.c')
-rw-r--r-- | src/identity/gnunet-service-identity.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c index fe6c3efa7..eeaa4e253 100644 --- a/src/identity/gnunet-service-identity.c +++ b/src/identity/gnunet-service-identity.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * represent the various egos/pseudonyms/identities of a GNUnet user. | 27 | * represent the various egos/pseudonyms/identities of a GNUnet user. |
28 | * | 28 | * |
29 | * Todo: | 29 | * Todo: |
30 | * - testcases | ||
31 | * - auto-initialze default egos; maybe trigger default | 30 | * - auto-initialze default egos; maybe trigger default |
32 | * initializations (such as gnunet-gns-import.sh?) | 31 | * initializations (such as gnunet-gns-import.sh?) |
33 | */ | 32 | */ |
@@ -320,8 +319,6 @@ handle_get_default_message (void *cls, struct GNUNET_SERVER_Client *client, | |||
320 | const char *name; | 319 | const char *name; |
321 | char *identifier; | 320 | char *identifier; |
322 | 321 | ||
323 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
324 | "Received GET_DEFAULT message from client\n"); | ||
325 | size = ntohs (message->size); | 322 | size = ntohs (message->size); |
326 | if (size <= sizeof (struct GNUNET_IDENTITY_GetDefaultMessage)) | 323 | if (size <= sizeof (struct GNUNET_IDENTITY_GetDefaultMessage)) |
327 | { | 324 | { |
@@ -340,6 +337,9 @@ handle_get_default_message (void *cls, struct GNUNET_SERVER_Client *client, | |||
340 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 337 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
341 | return; | 338 | return; |
342 | } | 339 | } |
340 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
341 | "Received GET_DEFAULT for service `%s' from client\n", | ||
342 | name); | ||
343 | if (GNUNET_OK != | 343 | if (GNUNET_OK != |
344 | GNUNET_CONFIGURATION_get_value_string (subsystem_cfg, | 344 | GNUNET_CONFIGURATION_get_value_string (subsystem_cfg, |
345 | name, | 345 | name, |
@@ -363,6 +363,9 @@ handle_get_default_message (void *cls, struct GNUNET_SERVER_Client *client, | |||
363 | return; | 363 | return; |
364 | } | 364 | } |
365 | } | 365 | } |
366 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
367 | "Failed to find ego `%s'\n", | ||
368 | name); | ||
366 | send_result_code (client, 1, | 369 | send_result_code (client, 1, |
367 | gettext_noop ("default configured, but ego unknown (internal error)")); | 370 | gettext_noop ("default configured, but ego unknown (internal error)")); |
368 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | 371 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
@@ -409,8 +412,6 @@ handle_set_default_message (void *cls, struct GNUNET_SERVER_Client *client, | |||
409 | const char *str; | 412 | const char *str; |
410 | struct GNUNET_CRYPTO_EccPrivateKey *pk; | 413 | struct GNUNET_CRYPTO_EccPrivateKey *pk; |
411 | 414 | ||
412 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
413 | "Received SET_DEFAULT message from client\n"); | ||
414 | size = ntohs (message->size); | 415 | size = ntohs (message->size); |
415 | if (size <= sizeof (struct GNUNET_IDENTITY_SetDefaultMessage)) | 416 | if (size <= sizeof (struct GNUNET_IDENTITY_SetDefaultMessage)) |
416 | { | 417 | { |
@@ -436,6 +437,9 @@ handle_set_default_message (void *cls, struct GNUNET_SERVER_Client *client, | |||
436 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 437 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
437 | return; | 438 | return; |
438 | } | 439 | } |
440 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
441 | "Received SET_DEFAULT for service `%s' from client\n", | ||
442 | str); | ||
439 | for (ego = ego_head; NULL != ego; ego = ego->next) | 443 | for (ego = ego_head; NULL != ego; ego = ego->next) |
440 | { | 444 | { |
441 | if (0 == key_cmp (ego->pk, | 445 | if (0 == key_cmp (ego->pk, |
@@ -848,8 +852,10 @@ process_ego_file (void *cls, | |||
848 | filename); | 852 | filename); |
849 | return GNUNET_OK; | 853 | return GNUNET_OK; |
850 | } | 854 | } |
851 | 855 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | |
852 | ego->identifier = GNUNET_strdup (fn); | 856 | "Loaded ego `%s'\n", |
857 | fn + 1); | ||
858 | ego->identifier = GNUNET_strdup (fn + 1); | ||
853 | GNUNET_CONTAINER_DLL_insert (ego_head, | 859 | GNUNET_CONTAINER_DLL_insert (ego_head, |
854 | ego_tail, | 860 | ego_tail, |
855 | ego); | 861 | ego); |
@@ -904,6 +910,9 @@ run (void *cls, | |||
904 | GNUNET_SCHEDULER_shutdown (); | 910 | GNUNET_SCHEDULER_shutdown (); |
905 | return; | 911 | return; |
906 | } | 912 | } |
913 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
914 | "Loading subsystem configuration `%s'\n", | ||
915 | subsystem_cfg_file); | ||
907 | subsystem_cfg = GNUNET_CONFIGURATION_create (); | 916 | subsystem_cfg = GNUNET_CONFIGURATION_create (); |
908 | if ( (GNUNET_YES == | 917 | if ( (GNUNET_YES == |
909 | GNUNET_DISK_file_test (subsystem_cfg_file)) && | 918 | GNUNET_DISK_file_test (subsystem_cfg_file)) && |