diff options
Diffstat (limited to 'src/identity')
-rw-r--r-- | src/identity/plugin_rest_identity.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c index 89f6e7f8b..9f1765a63 100644 --- a/src/identity/plugin_rest_identity.c +++ b/src/identity/plugin_rest_identity.c | |||
@@ -560,6 +560,7 @@ ego_get_pubkey (struct GNUNET_REST_RequestHandle *con_handle, | |||
560 | 560 | ||
561 | if (strlen (GNUNET_REST_API_NS_IDENTITY_PUBKEY) >= strlen (handle->url)) | 561 | if (strlen (GNUNET_REST_API_NS_IDENTITY_PUBKEY) >= strlen (handle->url)) |
562 | { | 562 | { |
563 | handle->response_code = MHD_HTTP_NOT_FOUND; | ||
563 | handle->emsg = GNUNET_strdup(GNUNET_REST_IDENTITY_MISSING_PUBKEY); | 564 | handle->emsg = GNUNET_strdup(GNUNET_REST_IDENTITY_MISSING_PUBKEY); |
564 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 565 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
565 | return; | 566 | return; |
@@ -598,6 +599,7 @@ ego_get_name (struct GNUNET_REST_RequestHandle *con_handle, | |||
598 | 599 | ||
599 | if (strlen (GNUNET_REST_API_NS_IDENTITY_NAME) >= strlen (handle->url)) | 600 | if (strlen (GNUNET_REST_API_NS_IDENTITY_NAME) >= strlen (handle->url)) |
600 | { | 601 | { |
602 | handle->response_code = MHD_HTTP_NOT_FOUND; | ||
601 | handle->emsg = GNUNET_strdup(GNUNET_REST_IDENTITY_MISSING_NAME); | 603 | handle->emsg = GNUNET_strdup(GNUNET_REST_IDENTITY_MISSING_NAME); |
602 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 604 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
603 | return; | 605 | return; |
@@ -1036,7 +1038,6 @@ ego_delete_pubkey (struct GNUNET_REST_RequestHandle *con_handle, | |||
1036 | { | 1038 | { |
1037 | struct RequestHandle *handle = cls; | 1039 | struct RequestHandle *handle = cls; |
1038 | struct EgoEntry *ego_entry; | 1040 | struct EgoEntry *ego_entry; |
1039 | struct MHD_Response *resp; | ||
1040 | char *keystring; | 1041 | char *keystring; |
1041 | 1042 | ||
1042 | keystring = NULL; | 1043 | keystring = NULL; |
@@ -1053,9 +1054,9 @@ ego_delete_pubkey (struct GNUNET_REST_RequestHandle *con_handle, | |||
1053 | 1054 | ||
1054 | if (NULL == ego_entry) | 1055 | if (NULL == ego_entry) |
1055 | { | 1056 | { |
1056 | resp = GNUNET_REST_create_response (NULL); | 1057 | handle->response_code = MHD_HTTP_NOT_FOUND; |
1057 | handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND); | 1058 | handle->emsg = GNUNET_strdup(GNUNET_REST_IDENTITY_NOT_FOUND); |
1058 | GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); | 1059 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
1059 | return; | 1060 | return; |
1060 | } | 1061 | } |
1061 | 1062 | ||
@@ -1081,7 +1082,6 @@ ego_delete_name (struct GNUNET_REST_RequestHandle *con_handle, | |||
1081 | { | 1082 | { |
1082 | struct RequestHandle *handle = cls; | 1083 | struct RequestHandle *handle = cls; |
1083 | struct EgoEntry *ego_entry; | 1084 | struct EgoEntry *ego_entry; |
1084 | struct MHD_Response *resp; | ||
1085 | char *name; | 1085 | char *name; |
1086 | 1086 | ||
1087 | name = NULL; | 1087 | name = NULL; |
@@ -1098,9 +1098,9 @@ ego_delete_name (struct GNUNET_REST_RequestHandle *con_handle, | |||
1098 | 1098 | ||
1099 | if (NULL == ego_entry) | 1099 | if (NULL == ego_entry) |
1100 | { | 1100 | { |
1101 | resp = GNUNET_REST_create_response (NULL); | 1101 | handle->response_code = MHD_HTTP_NOT_FOUND; |
1102 | handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND); | 1102 | handle->emsg = GNUNET_strdup(GNUNET_REST_IDENTITY_NOT_FOUND); |
1103 | GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); | 1103 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
1104 | return; | 1104 | return; |
1105 | } | 1105 | } |
1106 | 1106 | ||