gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37110 - in gnunet: . src/jsonapi


From: gnunet
Subject: [GNUnet-SVN] r37110 - in gnunet: . src/jsonapi
Date: Mon, 2 May 2016 18:45:26 +0200

Author: schanzen
Date: 2016-05-02 18:45:26 +0200 (Mon, 02 May 2016)
New Revision: 37110

Modified:
   gnunet/configure.ac
   gnunet/src/jsonapi/jsonapi.c
Log:
- missed file; bugfix


Modified: gnunet/configure.ac
===================================================================
--- gnunet/configure.ac 2016-05-02 16:32:36 UTC (rev 37109)
+++ gnunet/configure.ac 2016-05-02 16:45:26 UTC (rev 37110)
@@ -1558,6 +1558,7 @@
 src/include/Makefile
 src/integration-tests/Makefile
 src/json/Makefile
+src/jsonapi/Makefile
 src/hostlist/Makefile
 src/multicast/Makefile
 src/multicast/multicast.conf

Modified: gnunet/src/jsonapi/jsonapi.c
===================================================================
--- gnunet/src/jsonapi/jsonapi.c        2016-05-02 16:32:36 UTC (rev 37109)
+++ gnunet/src/jsonapi/jsonapi.c        2016-05-02 16:45:26 UTC (rev 37110)
@@ -21,11 +21,11 @@
 #include "platform.h"
 #include "gnunet_json_lib.h"
 
-#define GNUNET_JSONAPI_JSONAPI_KEY_DATA "data"
+#define GNUNET_JSONAPI_KEY_DATA "data"
 
-#define GNUNET_JSONAPI_JSONAPI_KEY_ID "id"
+#define GNUNET_JSONAPI_KEY_ID "id"
 
-#define GNUNET_JSONAPI_JSONAPI_KEY_TYPE "type"
+#define GNUNET_JSONAPI_KEY_TYPE "type"
 
 struct GNUNET_JSONAPI_Resource
 {
@@ -93,8 +93,8 @@
 
   res->res_obj = json_object ();
 
-  json_object_set_new (res->res_obj, GNUNET_JSONAPI_JSONAPI_KEY_ID, 
json_string (id));
-  json_object_set_new (res->res_obj, GNUNET_JSONAPI_JSONAPI_KEY_TYPE, 
json_string (type));
+  json_object_set_new (res->res_obj, GNUNET_JSONAPI_KEY_ID, json_string (id));
+  json_object_set_new (res->res_obj, GNUNET_JSONAPI_KEY_TYPE, json_string 
(type));
 
   return res;
 }
@@ -172,7 +172,7 @@
 GNUNET_JSONAPI_resource_check_id (const struct GNUNET_JSONAPI_Resource 
*resource,
                                        const char* id)
 {
-  return check_resource_attr_str (resource, GNUNET_JSONAPI_JSONAPI_KEY_ID, id);
+  return check_resource_attr_str (resource, GNUNET_JSONAPI_KEY_ID, id);
 }
 
 /**
@@ -184,7 +184,7 @@
 json_t*
 GNUNET_JSONAPI_resource_get_id (const struct GNUNET_JSONAPI_Resource *resource)
 {
-  return GNUNET_JSONAPI_resource_read_attr (resource, 
GNUNET_JSONAPI_JSONAPI_KEY_ID);
+  return GNUNET_JSONAPI_resource_read_attr (resource, GNUNET_JSONAPI_KEY_ID);
 }
 
 /**
@@ -198,7 +198,7 @@
 GNUNET_JSONAPI_resource_check_type (const struct GNUNET_JSONAPI_Resource 
*resource,
                                          const char* type)
 {
-  return check_resource_attr_str (resource, GNUNET_JSONAPI_JSONAPI_KEY_TYPE, 
type);
+  return check_resource_attr_str (resource, GNUNET_JSONAPI_KEY_TYPE, type);
 }
 
 /**
@@ -285,7 +285,7 @@
  * @return a new JSON API resource or NULL on error.
  */
 struct GNUNET_JSONAPI_Object*
-GNUNET_JSONAPI_jsonapi_object_new ()
+GNUNET_JSONAPI_object_new ()
 {
   struct GNUNET_JSONAPI_Object *result;
 
@@ -320,7 +320,7 @@
   const char *type_json;
 
   struct GNUNET_JSON_Specification dspec[] = {
-    GNUNET_JSON_spec_string (GNUNET_JSONAPI_JSONAPI_KEY_TYPE, &type_json),
+    GNUNET_JSON_spec_string (GNUNET_JSONAPI_KEY_TYPE, &type_json),
     GNUNET_JSON_spec_end()
   };
 
@@ -354,7 +354,7 @@
   int i;
 
   struct GNUNET_JSON_Specification jsonapispec[] = {
-    GNUNET_JSON_spec_json (GNUNET_JSONAPI_JSONAPI_KEY_DATA, &data_json),
+    GNUNET_JSON_spec_json (GNUNET_JSONAPI_KEY_DATA, &data_json),
     GNUNET_JSON_spec_end()
   };
   if (GNUNET_OK !=
@@ -448,7 +448,7 @@
   {
     json_array_append (res_arr, res->res_obj);
   }
-  json_object_set (root_json, GNUNET_JSONAPI_JSONAPI_KEY_DATA, res_arr);
+  json_object_set (root_json, GNUNET_JSONAPI_KEY_DATA, res_arr);
   *result = json_dumps (root_json, JSON_INDENT(2));
   json_decref (root_json);
   json_decref (res_arr);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]