Merge pull request #9100 from InfernoEmbedded/fix-8695

Align prototype & implementation of enet_tasklet_disconnect & friends
pull/9122/head
Cruz Monrreal 2018-12-17 14:44:03 -06:00 committed by GitHub
commit c7c24de8ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -17,6 +17,7 @@
#ifndef ENET_TASKLET_H
#define ENET_TASKLET_H
#include "mesh_interface_types.h"
#ifdef __cplusplus
extern "C" {