Skip to content

Align prototype & implementation of enet_tasklet_disconnect & friends #9100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,8 @@ nsapi_error_t NanostackEthernetInterface::do_initialize()

nsapi_error_t Nanostack::EthernetInterface::bringdown()
{
return enet_tasklet_disconnect(true);
if (enet_tasklet_disconnect(true)) {
return NSAPI_ERROR_DEVICE_ERROR;
}
return NSAPI_ERROR_OK;
}
2 changes: 1 addition & 1 deletion features/nanostack/mbed-mesh-api/source/ethernet_tasklet.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ int8_t enet_tasklet_disconnect(bool send_cb)
if (tasklet_data_ptr->network_interface_id != INVALID_INTERFACE_ID) {
status = arm_nwk_interface_down(tasklet_data_ptr->network_interface_id);
tasklet_data_ptr->network_interface_id = INVALID_INTERFACE_ID;
if (send_cb == true) {
if (send_cb) {
enet_tasklet_network_state_changed(MESH_DISCONNECTED);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef ENET_TASKLET_H
#define ENET_TASKLET_H

#include "mesh_interface_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down