From b79c242dddd2354619fc533ac8f851ad866efa49 Mon Sep 17 00:00:00 2001 From: Anis Ellouze Date: Tue, 31 May 2016 12:10:56 +0100 Subject: [PATCH] resolve conflicts with master --- configure.ac | 1 - dm/dmcwmp.c | 2 +- dm/dmtree/tr098/landevice.c | 4 ++-- dm/dmtree/tr098/landevice.h | 1 + dm/dmtree/tr098/wandevice.h | 3 ++- event.c | 2 +- http.c | 22 +++++++++++----------- jshn.c | 4 ---- 8 files changed, 18 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index 558c05d..46b9cd5 100644 --- a/configure.ac +++ b/configure.ac @@ -50,7 +50,6 @@ AC_SUBST([LIBZ_LIBS]) LIBM_LIBS='-lm' AC_SUBST([LIBM_LIBS]) - LIBJSON_LIBS='-ljson-c' AC_SUBST([LIBJSON_LIBS]) diff --git a/dm/dmcwmp.c b/dm/dmcwmp.c index 0a711dc..ba802a6 100644 --- a/dm/dmcwmp.c +++ b/dm/dmcwmp.c @@ -371,7 +371,7 @@ void add_list_enabled_notify(char *param, char *notification, char *value) dm_enabled_notify = calloc(1, sizeof(struct param_fault)); // Should be calloc and not dmcalloc list_add_tail(&dm_enabled_notify->list, &list_enabled_notify); dm_enabled_notify->name = strdup(param); // Should be strdup and not dmstrdup - dm_enabled_notify->value = value ? strdup(value) : strdup(""); + dm_enabled_notify->value = value ? strdup(value) : strdup(""); // Should be strdup and not dmstrdup dm_enabled_notify->notification = strdup(notification); // Should be strdup and not dmstrdup } diff --git a/dm/dmtree/tr098/landevice.c b/dm/dmtree/tr098/landevice.c index 4d82586..9595664 100644 --- a/dm/dmtree/tr098/landevice.c +++ b/dm/dmtree/tr098/landevice.c @@ -721,7 +721,7 @@ int get_lan_dhcp_leasetime(char *refparam, struct dmctx *ctx, char **value) } } else { pch = strtok_r(ltime, "s", &spch); - if (strcmp(pch, ltime_ini) != 0) + if (strcmp(pch, ltime_ini) != 0) mtime += atoi(pch); } } @@ -729,7 +729,7 @@ int get_lan_dhcp_leasetime(char *refparam, struct dmctx *ctx, char **value) else { pch = strtok_r(ltime, "m", &spch); if (strcmp(pch, ltime_ini) != 0) { - mtime += 60 * atoi(pch); + mtime += 60 * atoi(pch); if(spch[0] !='\0') { ltime += strlen(pch)+1; ltime_ini += strlen(pch)+1; diff --git a/dm/dmtree/tr098/landevice.h b/dm/dmtree/tr098/landevice.h index e518951..d16a600 100644 --- a/dm/dmtree/tr098/landevice.h +++ b/dm/dmtree/tr098/landevice.h @@ -13,6 +13,7 @@ #define __LAN_DEVICE_H #include #include +#define NVRAM_FILE "/proc/nvram/WpaKey" struct wl_clientargs { diff --git a/dm/dmtree/tr098/wandevice.h b/dm/dmtree/tr098/wandevice.h index 0150516..07cc254 100644 --- a/dm/dmtree/tr098/wandevice.h +++ b/dm/dmtree/tr098/wandevice.h @@ -14,6 +14,7 @@ #include #include + struct wancprotoargs { struct uci_section *wancprotosection; @@ -36,4 +37,4 @@ struct wanargs char *fdev; }; int entry_method_root_WANDevice(struct dmctx *ctx); -#endif \ No newline at end of file +#endif diff --git a/event.c b/event.c index 0d32445..4cd1843 100644 --- a/event.c +++ b/event.c @@ -410,8 +410,8 @@ int event_remove_noretry_event_container(struct session *session) { struct event_container *event_container; struct dm_parameter *dm_parameter; - struct list_head *ilist, *q; + struct list_head *ilist, *q; list_for_each_safe(ilist,q,&(session->head_event_container)) { event_container = list_entry(ilist, struct event_container, list); diff --git a/http.c b/http.c index 93814d5..d456f8d 100644 --- a/http.c +++ b/http.c @@ -235,18 +235,18 @@ http_send_message(struct cwmp *cwmp, char *msg_out, int msg_out_len,char **msg_i if (!strlen(*msg_in)) FREE(*msg_in); - curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ip); - if (ip && ip[0] != '\0') { - if (!ip_acs || strcmp(ip_acs, ip) != 0) { - FREE(ip_acs); - ip_acs = strdup(ip); - external_init(); - external_simple("allow_cr_ip", ip_acs); - external_exit(); - } - } + curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ip); + if (ip && ip[0] != '\0') { + if (!ip_acs || strcmp(ip_acs, ip) != 0) { + FREE(ip_acs); + ip_acs = strdup(ip); + external_init(); + external_simple("allow_cr_ip", ip_acs); + external_exit(); + } + } - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code); + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code); if(http_code == 204) { CWMP_LOG (INFO,"Receive HTTP 204 No Content"); diff --git a/jshn.c b/jshn.c index 9da52d4..4f342a6 100644 --- a/jshn.c +++ b/jshn.c @@ -13,11 +13,7 @@ #include #include -#ifdef _AADJ #include -#else -#include -#endif #include "cwmp.h" #include "external.h"