[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-twister] 03/11: Bring difference into the service co
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-twister] 03/11: Bring difference into the service component. |
Date: |
Wed, 16 May 2018 10:41:58 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository twister.
commit 381051f98408cac24968e0d12f95effb5c30a26b
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue May 15 11:51:42 2018 +0200
Bring difference into the service component.
---
src/twister/taler-twister-service.c | 38 ++++++++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 11 deletions(-)
diff --git a/src/twister/taler-twister-service.c
b/src/twister/taler-twister-service.c
index c4c52fc..eb6db0c 100644
--- a/src/twister/taler-twister-service.c
+++ b/src/twister/taler-twister-service.c
@@ -256,7 +256,9 @@ static char delete_path[TWISTER_PATH_LENGTH] = {'\0'};
* Will point to a JSON string object which will get a
* character flipped.
*/
-static char flip_path[TWISTER_PATH_LENGTH] = {'\0'};
+static char flip_path_dl[TWISTER_PATH_LENGTH] = {'\0'};
+
+static char flip_path_ul[TWISTER_PATH_LENGTH] = {'\0'};
/**
* Will point to a JSON object to modify
@@ -1028,7 +1030,8 @@ modify_object (struct MHD_Connection *con,
static void
flip_object (struct MHD_Connection *con,
- struct HttpRequest *hr)
+ struct HttpRequest *hr,
+ char *flip_path)
{
char *target;
json_t *parent;
@@ -1434,11 +1437,11 @@ create_response (void *cls,
hack_response_code = 0; /* reset for next request */
}
- if ('\0' != flip_path[0])
+ if ('\0' != flip_path_dl[0])
{
TALER_LOG_DEBUG ("Will flip path: %s\n",
- flip_path);
- flip_object (con, hr);
+ flip_path_dl);
+ flip_object (con, hr, flip_path_dl);
}
if ('\0' != delete_path[0])
@@ -1975,12 +1978,22 @@ handle_modify_path (void *cls,
* @param src received message
*/
static void
-handle_flip_path (void *cls,
- const struct TWISTER_FlipPath *src)
+handle_flip_path_dl (void *cls,
+ const struct TWISTER_FlipPath *src)
{
struct GNUNET_SERVICE_Client *c = cls;
- strcpy (flip_path, src->path);
+ strcpy (flip_path_dl, src->path);
+ send_acknowledgement (c);
+}
+
+static void
+handle_flip_path_ul (void *cls,
+ const struct TWISTER_FlipPath *src)
+{
+ struct GNUNET_SERVICE_Client *c = cls;
+
+ strcpy (flip_path_ul, src->path);
send_acknowledgement (c);
}
@@ -2052,12 +2065,15 @@ GNUNET_SERVICE_MAIN
struct TWISTER_DeletePath,
NULL),
- GNUNET_MQ_hd_fixed_size (flip_path,
- TWISTER_MESSAGE_TYPE_FLIP_PATH_DL,
+ GNUNET_MQ_hd_fixed_size (flip_path_ul,
+ TWISTER_MESSAGE_TYPE_FLIP_PATH_UL,
struct TWISTER_FlipPath,
NULL),
-
+ GNUNET_MQ_hd_fixed_size (flip_path_dl,
+ TWISTER_MESSAGE_TYPE_FLIP_PATH_DL,
+ struct TWISTER_FlipPath,
+ NULL),
GNUNET_MQ_handler_end ());
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-twister] branch master updated (2e773e8 -> 5ac6f8f), gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 11/11: json_dumpb() way better., gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 06/11: dumping stringified flipped object into io_buf., gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 09/11: debug stmt, gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 05/11: object "walker" is HttpResponse-agnostic., gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 03/11: Bring difference into the service component.,
gnunet <=
- [GNUnet-SVN] [taler-twister] 08/11: export "flippers" to the internal API., gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 02/11: Differentiate between bit-flipping in download and upload., gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 01/11: Walk objects.., gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 10/11: do not use "tmp" buffer for response, gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 04/11: cosmetics., gnunet, 2018/05/16
- [GNUnet-SVN] [taler-twister] 07/11: debug stmt, gnunet, 2018/05/16