diff mbox series

[v2,1/5] dict: Rename dictionary struct and its key to distinguish it from simple lists

Message ID 1515769128-29657-1-git-send-email-stefan@herbrechtsmeier.net
State Changes Requested
Headers show
Series [v2,1/5] dict: Rename dictionary struct and its key to distinguish it from simple lists | expand

Commit Message

Stefan Herbrechtsmeier Jan. 12, 2018, 2:58 p.m. UTC
From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
---

Changes in v2: None

 bootloader/grub.c             | 12 ++++++------
 bootloader/grub.h             |  2 +-
 corelib/installer.c           |  4 ++--
 corelib/swupdate_dict.c       | 18 +++++++++---------
 handlers/swuforward_handler.c |  2 +-
 include/swupdate.h            |  4 ++--
 include/swupdate_dict.h       | 14 +++++++-------
 suricatta/server_hawkbit.c    |  6 +++---
 suricatta/server_hawkbit.h    |  2 +-
 9 files changed, 32 insertions(+), 32 deletions(-)

Comments

Stefano Babic Jan. 14, 2018, 5:08 p.m. UTC | #1
On 12/01/2018 15:58, stefan@herbrechtsmeier.net wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
> 
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
> ---
> 
> Changes in v2: None
> 
>  bootloader/grub.c             | 12 ++++++------
>  bootloader/grub.h             |  2 +-
>  corelib/installer.c           |  4 ++--
>  corelib/swupdate_dict.c       | 18 +++++++++---------
>  handlers/swuforward_handler.c |  2 +-
>  include/swupdate.h            |  4 ++--
>  include/swupdate_dict.h       | 14 +++++++-------
>  suricatta/server_hawkbit.c    |  6 +++---
>  suricatta/server_hawkbit.h    |  2 +-
>  9 files changed, 32 insertions(+), 32 deletions(-)
> 
> diff --git a/bootloader/grub.c b/bootloader/grub.c
> index 70bfef2..93682f0 100644
> --- a/bootloader/grub.c
> +++ b/bootloader/grub.c
> @@ -125,7 +125,7 @@ static int grubenv_parse_script(struct grubenv_t *grubenv, const char *script)
>  		goto cleanup;
>  	}
>  
> -	/* load  varname-value pairs from script into grubenv dictlist */
> +	/* load  key-value pairs from script into grubenv dictionary */
>  	/* Note that variables with no value assigned are skipped now.
>  	 * We should consider whether we want to replicate U-Boot behavior
>  	 * (unset if no value given). GRUB env tool distinguishes unsetting
> @@ -165,7 +165,7 @@ static inline void grubenv_update_size(struct grubenv_t *grubenv)
>  
>  	/* lengths of strings + '=' and '\n' characters */
>  	LIST_FOREACH(grubvar, &grubenv->vars, next) {
> -		size = size + strlen(grubvar->varname) +
> +		size = size + strlen(grubvar->key) +
>  						strlen(grubvar->value) + 2;
>  	}
>  	size += strlen(GRUBENV_HEADER);
> @@ -206,9 +206,9 @@ static int grubenv_write(struct grubenv_t *grubenv)
>  	strncpy(buf, GRUBENV_HEADER, strlen(GRUBENV_HEADER) + 1);
>  
>  	LIST_FOREACH(grubvar, &grubenv->vars, next) {
> -		llen = strlen(grubvar->varname) + strlen(grubvar->value) + 2;
> +		llen = strlen(grubvar->key) + strlen(grubvar->value) + 2;
>  		/* +1 for null termination */
> -		snprintf(line, llen + 1, "%s=%s\n", grubvar->varname,
> +		snprintf(line, llen + 1, "%s=%s\n", grubvar->key,
>  						grubvar->value);
>  		strncat(buf, line, llen);
>  	}
> @@ -252,7 +252,7 @@ static inline void grubenv_close(struct grubenv_t *grubenv)
>  	struct dict_entry *grubvar;
>  
>  	LIST_FOREACH(grubvar, &grubenv->vars, next) {
> -		dict_remove(&grubenv->vars, grubvar->varname);
> +		dict_remove(&grubenv->vars, grubvar->key);
>  	}
>  }
>  
> @@ -332,7 +332,7 @@ int bootloader_apply_list(const char *script)
>  	if ((ret = grubenv_open(&grubenv)))
>  		goto cleanup;
>  
> -	/* add variables from sw-description into dict list */
> +	/* add variables from sw-description into dictionary list */
>  	if ((ret = grubenv_parse_script(&grubenv, script)))
>  		goto cleanup;
>  
> diff --git a/bootloader/grub.h b/bootloader/grub.h
> index d7b2195..6fde318 100644
> --- a/bootloader/grub.h
> +++ b/bootloader/grub.h
> @@ -41,7 +41,7 @@
>  #define GRUBENV_PATH_NEW	GRUBENV_PATH ".new"
>  
>  struct grubenv_t {
> -	struct dictlist vars;
> +	struct dict vars;
>  	size_t size;
>  };
>  
> diff --git a/corelib/installer.c b/corelib/installer.c
> index fc3011e..e25c30c 100644
> --- a/corelib/installer.c
> +++ b/corelib/installer.c
> @@ -218,10 +218,10 @@ static int prepare_boot_script(struct swupdate_cfg *cfg, const char *script)
>  		return -1;
>  
>  	LIST_FOREACH(bootvar, &cfg->bootloader, next) {
> -		if (!bootvar->varname || !bootvar->value)
> +		if (!bootvar->key || !bootvar->value)
>  			continue;
>  		snprintf(buf, sizeof(buf), "%s %s\n",
> -			bootvar->varname,
> +			bootvar->key,
>  			bootvar->value);
>  		if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
>  			  TRACE("Error saving temporary file");
> diff --git a/corelib/swupdate_dict.c b/corelib/swupdate_dict.c
> index 4c8fb44..352c13a 100644
> --- a/corelib/swupdate_dict.c
> +++ b/corelib/swupdate_dict.c
> @@ -31,19 +31,19 @@
>  #include "util.h"
>  #include "swupdate_dict.h"
>  
> -static struct dict_entry *get_entry(struct dictlist *dictionary, char *key)
> +static struct dict_entry *get_entry(struct dict *dictionary, char *key)
>  {
>  	struct dict_entry *entry;
>  
>  	LIST_FOREACH(entry, dictionary, next) {
> -		if (strcmp(key, entry->varname) == 0)
> +		if (strcmp(key, entry->key) == 0)
>  			return entry;
>  	}
>  
>  	return NULL;
>  }
>  
> -int dict_insert_entry(struct dictlist *dictionary, char *key, char *value)
> +int dict_insert_entry(struct dict *dictionary, char *key, char *value)
>  {
>  	struct dict_entry *entry = (struct dict_entry *)malloc(sizeof(*entry));
>  
> @@ -51,7 +51,7 @@ int dict_insert_entry(struct dictlist *dictionary, char *key, char *value)
>  		return -ENOMEM;
>  
>  	memset(entry, 0, sizeof(*entry));
> -	entry->varname = strdup(key);
> +	entry->key = strdup(key);
>  	entry->value = strdup(value);
>  
>  	LIST_INSERT_HEAD(dictionary, entry, next);
> @@ -59,7 +59,7 @@ int dict_insert_entry(struct dictlist *dictionary, char *key, char *value)
>  	return 0;
>  }
>  
> -char *dict_get_value(struct dictlist *dictionary, char *key)
> +char *dict_get_value(struct dict *dictionary, char *key)
>  {
>  	struct dict_entry *entry = get_entry(dictionary, key);
>  
> @@ -69,7 +69,7 @@ char *dict_get_value(struct dictlist *dictionary, char *key)
>  	return entry->value;
>  }
>  
> -int dict_set_value(struct dictlist *dictionary, char *key, char *value)
> +int dict_set_value(struct dict *dictionary, char *key, char *value)
>  {
>  	struct dict_entry *entry = get_entry(dictionary, key);
>  
> @@ -88,12 +88,12 @@ int dict_set_value(struct dictlist *dictionary, char *key, char *value)
>  void dict_remove_entry(struct dict_entry *entry)
>  {
>  	LIST_REMOVE(entry, next);
> -	free(entry->varname);
> +	free(entry->key);
>  	free(entry->value);
>  	free(entry);
>  }
>  
> -void dict_remove(struct dictlist *dictionary, char *key)
> +void dict_remove(struct dict *dictionary, char *key)
>  {
>  
>  	struct dict_entry *entry = get_entry(dictionary, key);
> @@ -104,7 +104,7 @@ void dict_remove(struct dictlist *dictionary, char *key)
>  	dict_remove_entry(entry);
>  }
>  
> -void dict_drop_db(struct dictlist *dictionary)
> +void dict_drop_db(struct dict *dictionary)
>  {
>  	struct dict_entry *var;
>  
> diff --git a/handlers/swuforward_handler.c b/handlers/swuforward_handler.c
> index 61a3346..54aef4b 100644
> --- a/handlers/swuforward_handler.c
> +++ b/handlers/swuforward_handler.c
> @@ -339,7 +339,7 @@ static int install_remote_swu(struct img_type *img,
>  	LIST_FOREACH(url, &img->properties, next) {
>  		char curlheader[SWUPDATE_GENERAL_STRING_SIZE + strlen(CUSTOM_HEADER)];
>  
> -		if (!url->varname || !url->value || strcmp(url->varname, "url"))
> +		if (!url->key || !url->value || strcmp(url->key, "url"))
>  			continue;
>  
>  		conn = (struct curlconn *)calloc(1, sizeof(struct curlconn));
> diff --git a/include/swupdate.h b/include/swupdate.h
> index b065f7e..2e79817 100644
> --- a/include/swupdate.h
> +++ b/include/swupdate.h
> @@ -78,7 +78,7 @@ struct img_type {
>  	int install_directly;
>  	int is_script;
>  	int is_partitioner;
> -	struct dictlist properties;
> +	struct dict properties;
>  	long long partsize;
>  	int fdin;	/* Used for streaming file */
>  	off_t offset;	/* offset in cpio file */
> @@ -134,7 +134,7 @@ struct swupdate_cfg {
>  	struct imglist images;
>  	struct imglist partitions;
>  	struct imglist scripts;
> -	struct dictlist bootloader;
> +	struct dict bootloader;
>  	struct proclist extprocs;
>  	void *dgst;	/* Structure for signed images */
>  	struct swupdate_global_cfg globals;
> diff --git a/include/swupdate_dict.h b/include/swupdate_dict.h
> index d8edb63..f8b696f 100644
> --- a/include/swupdate_dict.h
> +++ b/include/swupdate_dict.h
> @@ -24,18 +24,18 @@
>  #include <bsdqueue.h>
>  
>  struct dict_entry {
> -	char *varname;
> +	char *key;
>  	char *value;
>  	LIST_ENTRY(dict_entry) next;
>  };
>  
> -LIST_HEAD(dictlist, dict_entry);
> +LIST_HEAD(dict, dict_entry);
>  
> -char *dict_get_value(struct dictlist *dictionary, char *key);
> -int dict_set_value(struct dictlist *dictionary, char *key, char *value);
> -int dict_insert_entry(struct dictlist *dictionary, char *key, char *value);
> -void dict_remove(struct dictlist *dictionary, char *key);
> +char *dict_get_value(struct dict *dictionary, char *key);
> +int dict_set_value(struct dict *dictionary, char *key, char *value);
> +int dict_insert_entry(struct dict *dictionary, char *key, char *value);
> +void dict_remove(struct dict *dictionary, char *key);
>  void dict_remove_entry(struct dict_entry *entry);
> -void dict_drop_db(struct dictlist *dictionary);
> +void dict_drop_db(struct dict *dictionary);
>  
>  #endif
> diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c
> index 670c7ae..51ed32f 100644
> --- a/suricatta/server_hawkbit.c
> +++ b/suricatta/server_hawkbit.c
> @@ -1348,7 +1348,7 @@ int get_target_data_length(void)
>  	struct dict_entry *entry;
>  
>  	LIST_FOREACH(entry, &server_hawkbit.configdata, next) {
> -		len += strlen(entry->varname) + strlen(entry->value) + strlen (" : ") + 6;
> +		len += strlen(entry->key) + strlen(entry->value) + strlen (" : ") + 6;
>  	}
>  
>  	return len;
> @@ -1382,14 +1382,14 @@ server_op_res_t server_send_target_data(void)
>  		if (ENOMEM_ASPRINTF ==
>  		    asprintf(&keyvalue, config_data,
>  				((first) ? ' ' : ','),
> -				entry->varname,
> +				entry->key,
>  				entry->value)) {
>  			ERROR("hawkBit server reply cannot be sent because of OOM.\n");
>  			result = SERVER_EINIT;
>  			goto cleanup;
>  		}
>  		first = false;
> -		TRACE("KEYVALUE=%s %s %s", keyvalue, entry->varname, entry->value);
> +		TRACE("KEYVALUE=%s %s %s", keyvalue, entry->key, entry->value);
>  		strcat(configData, keyvalue);
>  		free(keyvalue);
>  
> diff --git a/suricatta/server_hawkbit.h b/suricatta/server_hawkbit.h
> index 0655980..33f4afb 100644
> --- a/suricatta/server_hawkbit.h
> +++ b/suricatta/server_hawkbit.h
> @@ -40,7 +40,7 @@ typedef struct {
>  	unsigned int polling_interval;
>  	bool polling_interval_from_server;
>  	bool debug;
> -	struct dictlist configdata;
> +	struct dict configdata;
>  	bool has_to_send_configData;
>  	char *configData_url;
>  	char *cancel_url;
> 

Reviewed-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/bootloader/grub.c b/bootloader/grub.c
index 70bfef2..93682f0 100644
--- a/bootloader/grub.c
+++ b/bootloader/grub.c
@@ -125,7 +125,7 @@  static int grubenv_parse_script(struct grubenv_t *grubenv, const char *script)
 		goto cleanup;
 	}
 
-	/* load  varname-value pairs from script into grubenv dictlist */
+	/* load  key-value pairs from script into grubenv dictionary */
 	/* Note that variables with no value assigned are skipped now.
 	 * We should consider whether we want to replicate U-Boot behavior
 	 * (unset if no value given). GRUB env tool distinguishes unsetting
@@ -165,7 +165,7 @@  static inline void grubenv_update_size(struct grubenv_t *grubenv)
 
 	/* lengths of strings + '=' and '\n' characters */
 	LIST_FOREACH(grubvar, &grubenv->vars, next) {
-		size = size + strlen(grubvar->varname) +
+		size = size + strlen(grubvar->key) +
 						strlen(grubvar->value) + 2;
 	}
 	size += strlen(GRUBENV_HEADER);
@@ -206,9 +206,9 @@  static int grubenv_write(struct grubenv_t *grubenv)
 	strncpy(buf, GRUBENV_HEADER, strlen(GRUBENV_HEADER) + 1);
 
 	LIST_FOREACH(grubvar, &grubenv->vars, next) {
-		llen = strlen(grubvar->varname) + strlen(grubvar->value) + 2;
+		llen = strlen(grubvar->key) + strlen(grubvar->value) + 2;
 		/* +1 for null termination */
-		snprintf(line, llen + 1, "%s=%s\n", grubvar->varname,
+		snprintf(line, llen + 1, "%s=%s\n", grubvar->key,
 						grubvar->value);
 		strncat(buf, line, llen);
 	}
@@ -252,7 +252,7 @@  static inline void grubenv_close(struct grubenv_t *grubenv)
 	struct dict_entry *grubvar;
 
 	LIST_FOREACH(grubvar, &grubenv->vars, next) {
-		dict_remove(&grubenv->vars, grubvar->varname);
+		dict_remove(&grubenv->vars, grubvar->key);
 	}
 }
 
@@ -332,7 +332,7 @@  int bootloader_apply_list(const char *script)
 	if ((ret = grubenv_open(&grubenv)))
 		goto cleanup;
 
-	/* add variables from sw-description into dict list */
+	/* add variables from sw-description into dictionary list */
 	if ((ret = grubenv_parse_script(&grubenv, script)))
 		goto cleanup;
 
diff --git a/bootloader/grub.h b/bootloader/grub.h
index d7b2195..6fde318 100644
--- a/bootloader/grub.h
+++ b/bootloader/grub.h
@@ -41,7 +41,7 @@ 
 #define GRUBENV_PATH_NEW	GRUBENV_PATH ".new"
 
 struct grubenv_t {
-	struct dictlist vars;
+	struct dict vars;
 	size_t size;
 };
 
diff --git a/corelib/installer.c b/corelib/installer.c
index fc3011e..e25c30c 100644
--- a/corelib/installer.c
+++ b/corelib/installer.c
@@ -218,10 +218,10 @@  static int prepare_boot_script(struct swupdate_cfg *cfg, const char *script)
 		return -1;
 
 	LIST_FOREACH(bootvar, &cfg->bootloader, next) {
-		if (!bootvar->varname || !bootvar->value)
+		if (!bootvar->key || !bootvar->value)
 			continue;
 		snprintf(buf, sizeof(buf), "%s %s\n",
-			bootvar->varname,
+			bootvar->key,
 			bootvar->value);
 		if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
 			  TRACE("Error saving temporary file");
diff --git a/corelib/swupdate_dict.c b/corelib/swupdate_dict.c
index 4c8fb44..352c13a 100644
--- a/corelib/swupdate_dict.c
+++ b/corelib/swupdate_dict.c
@@ -31,19 +31,19 @@ 
 #include "util.h"
 #include "swupdate_dict.h"
 
-static struct dict_entry *get_entry(struct dictlist *dictionary, char *key)
+static struct dict_entry *get_entry(struct dict *dictionary, char *key)
 {
 	struct dict_entry *entry;
 
 	LIST_FOREACH(entry, dictionary, next) {
-		if (strcmp(key, entry->varname) == 0)
+		if (strcmp(key, entry->key) == 0)
 			return entry;
 	}
 
 	return NULL;
 }
 
-int dict_insert_entry(struct dictlist *dictionary, char *key, char *value)
+int dict_insert_entry(struct dict *dictionary, char *key, char *value)
 {
 	struct dict_entry *entry = (struct dict_entry *)malloc(sizeof(*entry));
 
@@ -51,7 +51,7 @@  int dict_insert_entry(struct dictlist *dictionary, char *key, char *value)
 		return -ENOMEM;
 
 	memset(entry, 0, sizeof(*entry));
-	entry->varname = strdup(key);
+	entry->key = strdup(key);
 	entry->value = strdup(value);
 
 	LIST_INSERT_HEAD(dictionary, entry, next);
@@ -59,7 +59,7 @@  int dict_insert_entry(struct dictlist *dictionary, char *key, char *value)
 	return 0;
 }
 
-char *dict_get_value(struct dictlist *dictionary, char *key)
+char *dict_get_value(struct dict *dictionary, char *key)
 {
 	struct dict_entry *entry = get_entry(dictionary, key);
 
@@ -69,7 +69,7 @@  char *dict_get_value(struct dictlist *dictionary, char *key)
 	return entry->value;
 }
 
-int dict_set_value(struct dictlist *dictionary, char *key, char *value)
+int dict_set_value(struct dict *dictionary, char *key, char *value)
 {
 	struct dict_entry *entry = get_entry(dictionary, key);
 
@@ -88,12 +88,12 @@  int dict_set_value(struct dictlist *dictionary, char *key, char *value)
 void dict_remove_entry(struct dict_entry *entry)
 {
 	LIST_REMOVE(entry, next);
-	free(entry->varname);
+	free(entry->key);
 	free(entry->value);
 	free(entry);
 }
 
-void dict_remove(struct dictlist *dictionary, char *key)
+void dict_remove(struct dict *dictionary, char *key)
 {
 
 	struct dict_entry *entry = get_entry(dictionary, key);
@@ -104,7 +104,7 @@  void dict_remove(struct dictlist *dictionary, char *key)
 	dict_remove_entry(entry);
 }
 
-void dict_drop_db(struct dictlist *dictionary)
+void dict_drop_db(struct dict *dictionary)
 {
 	struct dict_entry *var;
 
diff --git a/handlers/swuforward_handler.c b/handlers/swuforward_handler.c
index 61a3346..54aef4b 100644
--- a/handlers/swuforward_handler.c
+++ b/handlers/swuforward_handler.c
@@ -339,7 +339,7 @@  static int install_remote_swu(struct img_type *img,
 	LIST_FOREACH(url, &img->properties, next) {
 		char curlheader[SWUPDATE_GENERAL_STRING_SIZE + strlen(CUSTOM_HEADER)];
 
-		if (!url->varname || !url->value || strcmp(url->varname, "url"))
+		if (!url->key || !url->value || strcmp(url->key, "url"))
 			continue;
 
 		conn = (struct curlconn *)calloc(1, sizeof(struct curlconn));
diff --git a/include/swupdate.h b/include/swupdate.h
index b065f7e..2e79817 100644
--- a/include/swupdate.h
+++ b/include/swupdate.h
@@ -78,7 +78,7 @@  struct img_type {
 	int install_directly;
 	int is_script;
 	int is_partitioner;
-	struct dictlist properties;
+	struct dict properties;
 	long long partsize;
 	int fdin;	/* Used for streaming file */
 	off_t offset;	/* offset in cpio file */
@@ -134,7 +134,7 @@  struct swupdate_cfg {
 	struct imglist images;
 	struct imglist partitions;
 	struct imglist scripts;
-	struct dictlist bootloader;
+	struct dict bootloader;
 	struct proclist extprocs;
 	void *dgst;	/* Structure for signed images */
 	struct swupdate_global_cfg globals;
diff --git a/include/swupdate_dict.h b/include/swupdate_dict.h
index d8edb63..f8b696f 100644
--- a/include/swupdate_dict.h
+++ b/include/swupdate_dict.h
@@ -24,18 +24,18 @@ 
 #include <bsdqueue.h>
 
 struct dict_entry {
-	char *varname;
+	char *key;
 	char *value;
 	LIST_ENTRY(dict_entry) next;
 };
 
-LIST_HEAD(dictlist, dict_entry);
+LIST_HEAD(dict, dict_entry);
 
-char *dict_get_value(struct dictlist *dictionary, char *key);
-int dict_set_value(struct dictlist *dictionary, char *key, char *value);
-int dict_insert_entry(struct dictlist *dictionary, char *key, char *value);
-void dict_remove(struct dictlist *dictionary, char *key);
+char *dict_get_value(struct dict *dictionary, char *key);
+int dict_set_value(struct dict *dictionary, char *key, char *value);
+int dict_insert_entry(struct dict *dictionary, char *key, char *value);
+void dict_remove(struct dict *dictionary, char *key);
 void dict_remove_entry(struct dict_entry *entry);
-void dict_drop_db(struct dictlist *dictionary);
+void dict_drop_db(struct dict *dictionary);
 
 #endif
diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c
index 670c7ae..51ed32f 100644
--- a/suricatta/server_hawkbit.c
+++ b/suricatta/server_hawkbit.c
@@ -1348,7 +1348,7 @@  int get_target_data_length(void)
 	struct dict_entry *entry;
 
 	LIST_FOREACH(entry, &server_hawkbit.configdata, next) {
-		len += strlen(entry->varname) + strlen(entry->value) + strlen (" : ") + 6;
+		len += strlen(entry->key) + strlen(entry->value) + strlen (" : ") + 6;
 	}
 
 	return len;
@@ -1382,14 +1382,14 @@  server_op_res_t server_send_target_data(void)
 		if (ENOMEM_ASPRINTF ==
 		    asprintf(&keyvalue, config_data,
 				((first) ? ' ' : ','),
-				entry->varname,
+				entry->key,
 				entry->value)) {
 			ERROR("hawkBit server reply cannot be sent because of OOM.\n");
 			result = SERVER_EINIT;
 			goto cleanup;
 		}
 		first = false;
-		TRACE("KEYVALUE=%s %s %s", keyvalue, entry->varname, entry->value);
+		TRACE("KEYVALUE=%s %s %s", keyvalue, entry->key, entry->value);
 		strcat(configData, keyvalue);
 		free(keyvalue);
 
diff --git a/suricatta/server_hawkbit.h b/suricatta/server_hawkbit.h
index 0655980..33f4afb 100644
--- a/suricatta/server_hawkbit.h
+++ b/suricatta/server_hawkbit.h
@@ -40,7 +40,7 @@  typedef struct {
 	unsigned int polling_interval;
 	bool polling_interval_from_server;
 	bool debug;
-	struct dictlist configdata;
+	struct dict configdata;
 	bool has_to_send_configData;
 	char *configData_url;
 	char *cancel_url;