Spelling mistake

This commit is contained in:
Florian Hoss 2022-07-29 16:18:57 +02:00
parent bef08d0838
commit ad36e66ccf

View file

@ -40,13 +40,13 @@ namespace fw
{ {
firewall_rule_t *rule_ptr = (firewall_rule_t *)malloc(sizeof(firewall_rule_t)); firewall_rule_t *rule_ptr = (firewall_rule_t *)malloc(sizeof(firewall_rule_t));
rule_ptr->key = key; rule_ptr->key = key;
uint16_t eespom_position = eeprom_rule_position(key); uint16_t eeprom_position = eeprom_rule_position(key);
EEPROM.get(eespom_position, rule_ptr->ip); EEPROM.get(eeprom_position, rule_ptr->ip);
EEPROM.get(eespom_position += sizeof(rule_ptr->ip), rule_ptr->port_from); EEPROM.get(eeprom_position += sizeof(rule_ptr->ip), rule_ptr->port_from);
EEPROM.get(eespom_position += sizeof(rule_ptr->port_from), rule_ptr->port_to); EEPROM.get(eeprom_position += sizeof(rule_ptr->port_from), rule_ptr->port_to);
EEPROM.get(eespom_position += sizeof(rule_ptr->port_to), rule_ptr->protocol); EEPROM.get(eeprom_position += sizeof(rule_ptr->port_to), rule_ptr->protocol);
EEPROM.get(eespom_position += sizeof(rule_ptr->protocol), rule_ptr->target); EEPROM.get(eeprom_position += sizeof(rule_ptr->protocol), rule_ptr->target);
return rule_ptr; return rule_ptr;
} }
@ -62,13 +62,13 @@ namespace fw
void Storage::store_firewall_rule(firewall_rule_t *rule_ptr) void Storage::store_firewall_rule(firewall_rule_t *rule_ptr)
{ {
uint16_t eespom_position = eeprom_rule_position(rule_ptr->key); uint16_t eeprom_position = eeprom_rule_position(rule_ptr->key);
EEPROM.put(eespom_position, rule_ptr->ip); EEPROM.put(eeprom_position, rule_ptr->ip);
EEPROM.put(eespom_position += sizeof(rule_ptr->ip), rule_ptr->port_from); EEPROM.put(eeprom_position += sizeof(rule_ptr->ip), rule_ptr->port_from);
EEPROM.put(eespom_position += sizeof(rule_ptr->port_from), rule_ptr->port_to); EEPROM.put(eeprom_position += sizeof(rule_ptr->port_from), rule_ptr->port_to);
EEPROM.put(eespom_position += sizeof(rule_ptr->port_to), rule_ptr->protocol); EEPROM.put(eeprom_position += sizeof(rule_ptr->port_to), rule_ptr->protocol);
EEPROM.put(eespom_position += sizeof(rule_ptr->protocol), rule_ptr->target); EEPROM.put(eeprom_position += sizeof(rule_ptr->protocol), rule_ptr->target);
EEPROM.commit(); EEPROM.commit();
} }