From 9fd68c37540512a546811e09d3d8cfcff9de8090 Mon Sep 17 00:00:00 2001 From: Hasnain Virk Date: Fri, 15 Sep 2017 17:29:42 +0300 Subject: [PATCH] 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. --- .../cellular/generic_modem_driver/PPPCellularInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp b/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp index 06c0de8299..f87864626f 100644 --- a/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp +++ b/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp @@ -141,7 +141,7 @@ static void CMT_URC(ATCmdParser *at) static bool set_atd(ATCmdParser *at) { - bool success = at->send("ATD*99***" CTX"#") && at->recv("CONNECT"); + bool success = at->send("ATD*99***" CTX "#") && at->recv("CONNECT"); return success; } @@ -469,7 +469,7 @@ retry_without_dual_stack: #endif success = _at->send("AT" "+FCLASS=0;" // set to connection (ATD) to data mode - "+CGDCONT=" CTX",\"%s\",\"%s%s\"", + "+CGDCONT=" CTX ",\"%s\",\"%s%s\"", pdp_type, auth, _apn ) && _at->recv("OK");