Skip to content

Commit 183dd7c

Browse files
committed
GEMALTO CINTERION: add configuration for urcs during read
1 parent 05d8c26 commit 183dd7c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularStack.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,13 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_sendto_impl(Cellul
527527
return (_at.get_last_error() == NSAPI_ERROR_OK) ? accept_len : NSAPI_ERROR_DEVICE_ERROR;
528528
}
529529

530-
#define DISABLE_URCs _at.at_cmd_discard("^SCFG", "=", "%s%s","Tcp/WithURCs","off")
531-
#define RESTORE_URCs_AND_RETURN(ret) do { _at.at_cmd_discard("^SCFG", "=", "%s%s","Tcp/WithURCs","on"); return ret; } while(0)
530+
#if defined GEMALTO_CINTERION_DISABLE_URC_READING
531+
#define DISABLE_URCs _at.at_cmd_discard("^SCFG", "=", "%s%s","Tcp/WithURCs","off")
532+
#define RESTORE_URCs_AND_RETURN(ret) do { _at.at_cmd_discard("^SCFG", "=", "%s%s","Tcp/WithURCs","on"); return ret; } while(0)
533+
#else
534+
#define DISABLE_URCs
535+
#define RESTORE_URCs_AND_RETURN(ret) do { return ret; } while(0)
536+
#endif
532537

533538
nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_recvfrom_impl(CellularSocket *socket, SocketAddress *address,
534539
void *buffer, nsapi_size_t size)

0 commit comments

Comments
 (0)