Skip to content

Cellular: Add offload TLSSocket implementation inside feature flag #12633

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
Mar 17, 2020
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 @@ -525,6 +525,8 @@ void QUECTEL_BG96_CellularStack::ip2dot(const SocketAddress &ip, char *dot)
}
}

#if defined(MBED_CONF_NSAPI_OFFLOAD_TLSSOCKET) && (MBED_CONF_NSAPI_OFFLOAD_TLSSOCKET)

nsapi_error_t QUECTEL_BG96_CellularStack::set_to_modem_impl(const char *filename, const char *config, const char *data, size_t size)
{
// Delete old file from the modem.
Expand All @@ -549,7 +551,6 @@ nsapi_error_t QUECTEL_BG96_CellularStack::set_to_modem_impl(const char *filename
return _at.get_last_error();
}


nsapi_error_t QUECTEL_BG96_CellularStack::setsockopt(nsapi_socket_t handle, int level,
int optname, const void *optval, unsigned optlen)
{
Expand Down Expand Up @@ -641,3 +642,4 @@ nsapi_error_t QUECTEL_BG96_CellularStack::setsockopt(nsapi_socket_t handle, int

return ret;
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ class QUECTEL_BG96_CellularStack : public AT_CellularStack {
virtual nsapi_error_t gethostbyname_async_cancel(int id);
#endif

#if defined(MBED_CONF_NSAPI_OFFLOAD_TLSSOCKET) && (MBED_CONF_NSAPI_OFFLOAD_TLSSOCKET)
virtual nsapi_error_t setsockopt(nsapi_socket_t handle, int level,
int optname, const void *optval, unsigned optlen);
#endif

protected: // AT_CellularStack

Expand All @@ -79,7 +81,9 @@ class QUECTEL_BG96_CellularStack : public AT_CellularStack {

void handle_open_socket_response(int &modem_connect_id, int &err, bool tlssocket);

#if defined(MBED_CONF_NSAPI_OFFLOAD_TLSSOCKET) && (MBED_CONF_NSAPI_OFFLOAD_TLSSOCKET)
nsapi_error_t set_to_modem_impl(const char *filename, const char *config, const char *data, size_t size);
#endif

#ifdef MBED_CONF_CELLULAR_OFFLOAD_DNS_QUERIES
// URC handler for DNS query
Expand Down