Skip to content

Commit dc21432

Browse files
authored
Merge pull request #12633 from kivaisan/bg96_use_offload_tlssocket_flags
Cellular: Add offload TLSSocket implementation inside feature flag
2 parents ca7d033 + 51175ee commit dc21432

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,8 @@ void QUECTEL_BG96_CellularStack::ip2dot(const SocketAddress &ip, char *dot)
525525
}
526526
}
527527

528+
#if defined(MBED_CONF_NSAPI_OFFLOAD_TLSSOCKET) && (MBED_CONF_NSAPI_OFFLOAD_TLSSOCKET)
529+
528530
nsapi_error_t QUECTEL_BG96_CellularStack::set_to_modem_impl(const char *filename, const char *config, const char *data, size_t size)
529531
{
530532
// Delete old file from the modem.
@@ -549,7 +551,6 @@ nsapi_error_t QUECTEL_BG96_CellularStack::set_to_modem_impl(const char *filename
549551
return _at.get_last_error();
550552
}
551553

552-
553554
nsapi_error_t QUECTEL_BG96_CellularStack::setsockopt(nsapi_socket_t handle, int level,
554555
int optname, const void *optval, unsigned optlen)
555556
{
@@ -641,3 +642,4 @@ nsapi_error_t QUECTEL_BG96_CellularStack::setsockopt(nsapi_socket_t handle, int
641642

642643
return ret;
643644
}
645+
#endif

features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ class QUECTEL_BG96_CellularStack : public AT_CellularStack {
5454
virtual nsapi_error_t gethostbyname_async_cancel(int id);
5555
#endif
5656

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

6062
protected: // AT_CellularStack
6163

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

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

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

8488
#ifdef MBED_CONF_CELLULAR_OFFLOAD_DNS_QUERIES
8589
// URC handler for DNS query

0 commit comments

Comments
 (0)