Skip to content

Commit 9fd68c3

Browse files
Hasnain Virkadbridge
authored andcommitted
Seperatig string literal from macro
From C++11 and beyond string literals must be seperated by space so that they are recongizable as seperate tokens. Context macro in PPPCellularInterface (CTX) has been causing issues as it was not augmented with a space from a nearby string literal.
1 parent 80ae6ac commit 9fd68c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static void CMT_URC(ATCmdParser *at)
141141

142142
static bool set_atd(ATCmdParser *at)
143143
{
144-
bool success = at->send("ATD*99***" CTX"#") && at->recv("CONNECT");
144+
bool success = at->send("ATD*99***" CTX "#") && at->recv("CONNECT");
145145

146146
return success;
147147
}
@@ -469,7 +469,7 @@ nsapi_error_t PPPCellularInterface::setup_context_and_credentials()
469469
#endif
470470
success = _at->send("AT"
471471
"+FCLASS=0;" // set to connection (ATD) to data mode
472-
"+CGDCONT=" CTX",\"%s\",\"%s%s\"",
472+
"+CGDCONT=" CTX ",\"%s\",\"%s%s\"",
473473
pdp_type, auth, _apn
474474
)
475475
&& _at->recv("OK");

0 commit comments

Comments
 (0)