From 2445e61a3fe15cb9aa82ce7754c76625055a059d Mon Sep 17 00:00:00 2001 From: PolynomialDivision Date: Wed, 13 Dec 2017 11:05:03 +0100 Subject: [PATCH] return in functions --- src/utils/ubus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/ubus.c b/src/utils/ubus.c index 3b30557..5ed4e09 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -429,14 +429,15 @@ int handle_network_msg(char* msg) blob_buf_init(&network_buf, 0); blobmsg_add_json_from_string(&network_buf, msg); - return -1; - printf("TO JSON AGAIN PARSING: %s\n",blobmsg_format_json(network_buf.head, true)); printf("PARSING NETWORK MSG!\n"); blobmsg_parse(network_policy, __NETWORK_MAX, tb, blob_data(network_buf.head), blob_len(network_buf.head)); printf("PARSING FINISHED NETWORK MSG!\n"); + return -1; + + if(!tb[NETWORK_METHOD] ||!tb[NETWORK_DATA] ) { return -1;