Skip to content

Commit

Permalink
Codereview cleaning's
Browse files Browse the repository at this point in the history
Change-Id: I86cad0fa3d4d4edc9e4e8342b2f3873c4080239a
  • Loading branch information
Juha Heiskanen committed May 15, 2019
1 parent 9350293 commit 67bb748
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 0 additions & 2 deletions source/6LoWPAN/ws/ws_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1669,8 +1669,6 @@ int ws_bootstrap_aro_failure(protocol_interface_info_entry_t *cur, const uint8_t
blacklist_update(ll_address, false);
rpl_control_neighbor_delete(cur, ll_address);
ws_bootstrap_neighbor_remove(cur, ll_address);
//Cancel DHCPV6 If it is active but not finished yest
//dhcp_client_address_cancel(cur->id, NULL);
return 0;
}

Expand Down
19 changes: 9 additions & 10 deletions source/DHCPv6_client/dhcpv6_client_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,20 +317,19 @@ int dhcp_client_server_address_update(int8_t interface, uint8_t prefix[static 16
} else if (dhcp_client.one_instance_interface) {
srv_data_ptr = libdhcpv6_nonTemporal_entry_get_by_instance(dhcp_client.libDhcp_instance);
}
if (srv_data_ptr) {
if (memcmp(srv_data_ptr->server_address, server_address, 16) == 0) {
return 0;
}
if (!srv_data_ptr) {
return -1;
}

if (srv_data_ptr) {
memcpy(srv_data_ptr->server_address, server_address, 16);
if (!srv_data_ptr->iaNonTemporalStructValid) {
dhcp_service_update_server_address(srv_data_ptr->transActionId, server_address);
}
if (memcmp(srv_data_ptr->server_address, server_address, 16) == 0) {
return 0;
}
return -1;

memcpy(srv_data_ptr->server_address, server_address, 16);
if (!srv_data_ptr->iaNonTemporalStructValid) {
dhcp_service_update_server_address(srv_data_ptr->transActionId, server_address);
}
return 0;
}


Expand Down
1 change: 0 additions & 1 deletion source/libDHCPv6/dhcp_service_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,6 @@ void dhcp_service_update_server_address(uint32_t msg_tr_id, uint8_t *server_addr
msg_tr_ptr = dhcp_tr_find(msg_tr_id);

if (msg_tr_ptr != NULL) {
tr_debug("Set New Server address %s", trace_ipv6(server_address));
memcpy(msg_tr_ptr->addr.address, server_address, 16);
}
}
Expand Down

0 comments on commit 67bb748

Please sign in to comment.