summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Decavel2009-09-15 09:52:55 +0200
committerBenjamin Decavel2009-09-15 09:52:55 +0200
commit8f099288e6e2a6eb9e880dd9da0996b5234f5231 (patch)
treec125fc381e418e22df1040f4cfa06ecf20a28bce
parent749a38871a4e66ec72798caaa761b56899346b70 (diff)
ndd: autoUpgrade_en field of the whitelist is now checked before launching an autoupdate
-rw-r--r--application/ndd/src/ndd.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/application/ndd/src/ndd.c b/application/ndd/src/ndd.c
index b250f76b2a..2f41ddd6ee 100644
--- a/application/ndd/src/ndd.c
+++ b/application/ndd/src/ndd.c
@@ -271,8 +271,16 @@ int slave_detected(char* mac_slave)
slave_config.eth_port = eth_port;
}
- /* Auto-update part, check auto-update is selected in the config file and that an update has been requested for this particular slave */
- if (auto_update_enabled && slave_config.update_asked)
+ /* Retrieve the slave entry in the whitelist */
+ spidlib_whitelist_entry_t temp_whitelist;
+ memset(&temp_whitelist, 0, sizeof(spidlib_whitelist_entry_t));
+ if (spidlib_get_whitelist_entry (mac_str_lower, &temp_whitelist) != 0)
+ {
+ syslog(LOG_DEBUG, "ndd: no entry for %s in the whitelist", mac_str_lower);
+ }
+
+ /* Auto-update part, check auto-update is selected in the config file, that an update has been requested for this particular slave and that auto-update is allowed in the whitelist */
+ if (auto_update_enabled && slave_config.update_asked && temp_whitelist.autoUpgrade_en == SPIDLIB_TRUE)
{
/* Launch and get the result of the update */
int archi = 0;