Skip to content
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
5 changes: 0 additions & 5 deletions UNITTESTS/stubs/NetworkStack_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ NetworkStack *nsapi_create_stack(nsapi_stack_t *stack)
return reinterpret_cast<NetworkStack *>(stack);
}

NetworkStack *nsapi_create_stack(NetworkStack *stack)
{
return reinterpret_cast<NetworkStack *>(stack);
}

nsapi_value_or_error_t NetworkStack::gethostbyname_async(const char *host, hostbyname_cb_t callback, nsapi_version_t version,
const char *interface_name)
{
Expand Down
5 changes: 0 additions & 5 deletions features/netsocket/NetworkStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,3 @@ NetworkStack *nsapi_create_stack(nsapi_stack_t *stack)
return new (stack->_stack_buffer) NetworkStackWrapper;
}

NetworkStack *nsapi_create_stack(NetworkStack *stack)
{
return stack;
}

14 changes: 9 additions & 5 deletions features/netsocket/NetworkStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,18 @@ class NetworkStack: public DNS {

/** Convert a raw nsapi_stack_t object into a C++ NetworkStack object
*
* @param stack Reference to an object that can be converted to a stack
* @param stack Pointer to an object that can be converted to a stack
* - A raw nsapi_stack_t object
* - A reference to a network stack
* - A reference to a network interface
* @return Reference to the underlying network stack
* - A pointer to a network stack
* - A pointer to a network interface
* @return Pointer to the underlying network stack
*/
NetworkStack *nsapi_create_stack(nsapi_stack_t *stack);
NetworkStack *nsapi_create_stack(NetworkStack *stack);

inline NetworkStack *nsapi_create_stack(NetworkStack *stack)
{
return stack;
}

template <typename IF>
NetworkStack *nsapi_create_stack(IF *iface)
Expand Down