Skip to content

Commit c7c24de

Browse files
author
Cruz Monrreal
authored
Merge pull request #9100 from InfernoEmbedded/fix-8695
Align prototype & implementation of enet_tasklet_disconnect & friends
2 parents ff6744c + d527585 commit c7c24de

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

features/nanostack/mbed-mesh-api/source/NanostackEthernetInterface.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,8 @@ nsapi_error_t NanostackEthernetInterface::do_initialize()
9797

9898
nsapi_error_t Nanostack::EthernetInterface::bringdown()
9999
{
100-
return enet_tasklet_disconnect(true);
100+
if (enet_tasklet_disconnect(true)) {
101+
return NSAPI_ERROR_DEVICE_ERROR;
102+
}
103+
return NSAPI_ERROR_OK;
101104
}

features/nanostack/mbed-mesh-api/source/ethernet_tasklet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ int8_t enet_tasklet_disconnect(bool send_cb)
294294
if (tasklet_data_ptr->network_interface_id != INVALID_INTERFACE_ID) {
295295
status = arm_nwk_interface_down(tasklet_data_ptr->network_interface_id);
296296
tasklet_data_ptr->network_interface_id = INVALID_INTERFACE_ID;
297-
if (send_cb == true) {
297+
if (send_cb) {
298298
enet_tasklet_network_state_changed(MESH_DISCONNECTED);
299299
}
300300
}

features/nanostack/mbed-mesh-api/source/include/enet_tasklet.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#ifndef ENET_TASKLET_H
1818
#define ENET_TASKLET_H
1919

20+
#include "mesh_interface_types.h"
2021

2122
#ifdef __cplusplus
2223
extern "C" {

0 commit comments

Comments
 (0)