diff options
-rw-r--r-- | src/json/json_generator.c | 2 | ||||
-rw-r--r-- | src/json/json_gnsrecord.c | 12 | ||||
-rw-r--r-- | src/namestore/plugin_rest_namestore.c | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/json/json_generator.c b/src/json/json_generator.c index 7b24a3c12..d8c82bc86 100644 --- a/src/json/json_generator.c +++ b/src/json/json_generator.c | |||
@@ -166,7 +166,7 @@ GNUNET_JSON_from_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *sig) | |||
166 | */ | 166 | */ |
167 | json_t * | 167 | json_t * |
168 | GNUNET_JSON_from_gns_record (const char* rname, | 168 | GNUNET_JSON_from_gns_record (const char* rname, |
169 | const struct GNUNET_GNSRECORD_Data *rd) | 169 | const struct GNUNET_GNSRECORD_Data *rd) |
170 | { | 170 | { |
171 | struct GNUNET_TIME_Absolute expiration_time; | 171 | struct GNUNET_TIME_Absolute expiration_time; |
172 | const char *expiration_time_str; | 172 | const char *expiration_time_str; |
diff --git a/src/json/json_gnsrecord.c b/src/json/json_gnsrecord.c index 48b78f38b..4f6d30748 100644 --- a/src/json/json_gnsrecord.c +++ b/src/json/json_gnsrecord.c | |||
@@ -23,7 +23,6 @@ | |||
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_util_lib.h" | 25 | #include "gnunet_util_lib.h" |
26 | #include "gnunet_gnsrecord_lib.h" | ||
27 | #include "gnunet_json_lib.h" | 26 | #include "gnunet_json_lib.h" |
28 | 27 | ||
29 | #define GNUNET_JSON_GNSRECORD_VALUE "value" | 28 | #define GNUNET_JSON_GNSRECORD_VALUE "value" |
@@ -111,7 +110,16 @@ parse_gnsrecordobject (void *cls, | |||
111 | } | 110 | } |
112 | else | 111 | else |
113 | { | 112 | { |
114 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Value invalid for expiration time"); | 113 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Expiration time invalid"); |
114 | return GNUNET_SYSERR; | ||
115 | } | ||
116 | // check if flag is a valid enum value | ||
117 | if ((GNUNET_GNSRECORD_RF_NONE != flag) | ||
118 | && (GNUNET_GNSRECORD_RF_PRIVATE != flag) | ||
119 | && (GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION != flag) | ||
120 | && (GNUNET_GNSRECORD_RF_SHADOW_RECORD) != flag) | ||
121 | { | ||
122 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Flag invalid"); | ||
115 | return GNUNET_SYSERR; | 123 | return GNUNET_SYSERR; |
116 | } | 124 | } |
117 | gnsrecord_object->flags = (enum GNUNET_GNSRECORD_Flags)flag; | 125 | gnsrecord_object->flags = (enum GNUNET_GNSRECORD_Flags)flag; |
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c index 6924c53a4..90928165e 100644 --- a/src/namestore/plugin_rest_namestore.c +++ b/src/namestore/plugin_rest_namestore.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "microhttpd.h" | 32 | #include "microhttpd.h" |
33 | #include <jansson.h> | 33 | #include <jansson.h> |
34 | 34 | ||
35 | |||
35 | #define GNUNET_REST_API_NS_NAMESTORE "/namestore" | 36 | #define GNUNET_REST_API_NS_NAMESTORE "/namestore" |
36 | 37 | ||
37 | #define GNUNET_REST_SUBSYSTEM_NAMESTORE "namestore" | 38 | #define GNUNET_REST_SUBSYSTEM_NAMESTORE "namestore" |
@@ -40,8 +41,6 @@ | |||
40 | 41 | ||
41 | #define GNUNET_REST_NAMESTORE_RD_COUNT 1 | 42 | #define GNUNET_REST_NAMESTORE_RD_COUNT 1 |
42 | 43 | ||
43 | //TODO define other variables | ||
44 | |||
45 | /** | 44 | /** |
46 | * The configuration handle | 45 | * The configuration handle |
47 | */ | 46 | */ |
@@ -60,8 +59,6 @@ struct Plugin | |||
60 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 59 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
61 | }; | 60 | }; |
62 | 61 | ||
63 | //TODO add specific structs | ||
64 | |||
65 | /** | 62 | /** |
66 | * The default namestore ego | 63 | * The default namestore ego |
67 | */ | 64 | */ |
@@ -86,8 +83,6 @@ struct EgoEntry | |||
86 | 83 | ||
87 | struct RequestHandle | 84 | struct RequestHandle |
88 | { | 85 | { |
89 | //TODO add specific entries | ||
90 | |||
91 | /** | 86 | /** |
92 | * Records to store | 87 | * Records to store |
93 | */ | 88 | */ |
@@ -180,8 +175,6 @@ struct RequestHandle | |||
180 | 175 | ||
181 | }; | 176 | }; |
182 | 177 | ||
183 | |||
184 | //TODO add specific cleanup | ||
185 | /** | 178 | /** |
186 | * Cleanup lookup handle | 179 | * Cleanup lookup handle |
187 | * @param handle Handle to clean up | 180 | * @param handle Handle to clean up |
@@ -638,7 +631,6 @@ options_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
638 | static void | 631 | static void |
639 | init_cont (struct RequestHandle *handle) | 632 | init_cont (struct RequestHandle *handle) |
640 | { | 633 | { |
641 | //TODO specify parameter of init_cont if necessary | ||
642 | struct GNUNET_REST_RequestHandlerError err; | 634 | struct GNUNET_REST_RequestHandlerError err; |
643 | static const struct GNUNET_REST_RequestHandler handlers[] = { | 635 | static const struct GNUNET_REST_RequestHandler handlers[] = { |
644 | {MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_NAMESTORE, &namestore_get}, | 636 | {MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_NAMESTORE, &namestore_get}, |