commit 60ee61b31f70f3d35b53baf9209c3217c6a53f09
parent 6195e1470daef70a1429c254c7e55a4bce3eb2a3
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 10 Apr 2020 21:31:07 +0200
tolerate connection failures
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/twister/taler-twister-service.c b/src/twister/taler-twister-service.c
@@ -1148,7 +1148,7 @@ perform_modbody:
* @param con FIXME deprecated.
* @param json the object whose field will be flipped.
* @param flip_path the path to the string-field to flip.
- * @return GNUNET_OK when the path was found, and flipped.
+ * @return #GNUNET_OK when the path was found, and flipped.
*/
static int
flip_object (struct MHD_Connection *con,
@@ -1165,6 +1165,8 @@ flip_object (struct MHD_Connection *con,
'R', 'S', 'T', 'V', 'W', 'X',
'Y', 'Z'}; // index: 0-31
+ if (NULL == json)
+ return GNUNET_NO;
if (GNUNET_OK != walk_object (flip_path,
&parent,
&target,
@@ -1249,7 +1251,7 @@ flip_object (struct MHD_Connection *con,
*
* @param con FIXME deprecated.
* @param hr contains the object whose field will be deleted.
- * @return GNUNET_OK when the path was found, and deleted.
+ * @return #GNUNET_OK when the path was found, and deleted.
*/
static int
delete_object (struct MHD_Connection *con,
@@ -1258,6 +1260,8 @@ delete_object (struct MHD_Connection *con,
char *target;
json_t *parent;
+ if (NULL == hr->json)
+ return GNUNET_NO;
if (GNUNET_OK != walk_object (delete_path,
&parent,
&target,