celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1626692 - in /celix/trunk/remote_services: calculator_proxy/private/src/calculator_proxy_impl.c remote_service_admin/public/include/remote_endpoint_impl.h
Date Mon, 22 Sep 2014 08:17:10 GMT
Author: abroekhuis
Date: Mon Sep 22 08:17:10 2014
New Revision: 1626692

URL: http://svn.apache.org/r1626692
Log:
Updated proxy to use an object for the reply

Modified:
    celix/trunk/remote_services/calculator_proxy/private/src/calculator_proxy_impl.c
    celix/trunk/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h

Modified: celix/trunk/remote_services/calculator_proxy/private/src/calculator_proxy_impl.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_proxy/private/src/calculator_proxy_impl.c?rev=1626692&r1=1626691&r2=1626692&view=diff
==============================================================================
--- celix/trunk/remote_services/calculator_proxy/private/src/calculator_proxy_impl.c (original)
+++ celix/trunk/remote_services/calculator_proxy/private/src/calculator_proxy_impl.c Mon Sep
22 08:17:10 2014
@@ -75,10 +75,11 @@ celix_status_t calculatorProxy_add(calcu
 		calculator->sendToCallback(calculator->sendToHandler, calculator->endpoint, data,
&reply, &replyStatus);
 
 		if (status == CELIX_SUCCESS) {
+		    printf("Handle reply: %s\n", reply);
 			json_error_t error;
-			json_t *js_reply = json_loads(reply, JSON_DECODE_ANY, &error);
+			json_t *js_reply = json_loads(reply, 0, &error);
 			if (js_reply) {
-				json_unpack(js_reply, "f", result);
+				json_unpack(js_reply, "{s:f}", "r", result);
 			} else {
 				printf("PROXY: got error '%s' for '%s'\n", error.text, reply);
 				status = CELIX_BUNDLE_EXCEPTION;
@@ -109,7 +110,7 @@ celix_status_t calculatorProxy_sub(calcu
 
 		if (status == CELIX_SUCCESS) {
 			json_error_t error;
-			json_t *js_reply = json_loads(reply, JSON_DECODE_ANY, &error);
+			json_t *js_reply = json_loads(reply, 0, &error);
 			if (js_reply) {
 				json_unpack(js_reply, "f", result);
 			} else {

Modified: celix/trunk/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h?rev=1626692&r1=1626691&r2=1626692&view=diff
==============================================================================
--- celix/trunk/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h
(original)
+++ celix/trunk/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h
Mon Sep 22 08:17:10 2014
@@ -31,7 +31,7 @@
 
 struct remote_endpoint {
 	void *service;
-	apr_pool_t* pool;
+//	apr_pool_t* pool;
 };
 
 #endif /* REMOTE_ENDPOINT_IMPL_H_ */



Mime
View raw message