diff options
-rw-r--r-- | src/identity/plugin_rest_identity.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c index 5f34d0f1b..33804143d 100644 --- a/src/identity/plugin_rest_identity.c +++ b/src/identity/plugin_rest_identity.c | |||
@@ -593,6 +593,7 @@ ego_edit_cont (struct GNUNET_REST_RequestHandle *con, | |||
593 | struct GNUNET_JSONAPI_Resource *json_res; | 593 | struct GNUNET_JSONAPI_Resource *json_res; |
594 | struct RequestHandle *handle = cls; | 594 | struct RequestHandle *handle = cls; |
595 | struct EgoEntry *ego_entry; | 595 | struct EgoEntry *ego_entry; |
596 | struct EgoEntry *ego_entry_tmp; | ||
596 | struct MHD_Response *resp; | 597 | struct MHD_Response *resp; |
597 | json_t *subsys_json; | 598 | json_t *subsys_json; |
598 | json_t *name_json; | 599 | json_t *name_json; |
@@ -684,12 +685,12 @@ ego_edit_cont (struct GNUNET_REST_RequestHandle *con, | |||
684 | if ((NULL != name_json) && json_is_string (name_json)) | 685 | if ((NULL != name_json) && json_is_string (name_json)) |
685 | { | 686 | { |
686 | newname = json_string_value (name_json); | 687 | newname = json_string_value (name_json); |
687 | for (ego_entry = handle->ego_head; | 688 | for (ego_entry_tmp = handle->ego_head; |
688 | NULL != ego_entry; | 689 | NULL != ego_entry_tmp; |
689 | ego_entry = ego_entry->next) | 690 | ego_entry_tmp = ego_entry_tmp->next) |
690 | { | 691 | { |
691 | if (0 == strcasecmp (newname, ego_entry->identifier) && | 692 | if (0 == strcasecmp (newname, ego_entry_tmp->identifier) && |
692 | 0 != strcasecmp (keystring, ego_entry->keystring)) | 693 | 0 != strcasecmp (keystring, ego_entry_tmp->keystring)) |
693 | { | 694 | { |
694 | //Ego with same name not allowed | 695 | //Ego with same name not allowed |
695 | GNUNET_JSONAPI_document_delete (json_obj); | 696 | GNUNET_JSONAPI_document_delete (json_obj); |