forked from arduino/ArduinoCore-mbed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0096-Overwrite-old-context-with-new-one-if-they-are-diffe.patch
31 lines (28 loc) · 1.48 KB
/
0096-Overwrite-old-context-with-new-one-if-they-are-diffe.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From bd6e7456beb92b44efa228239cead7c5d16654ab Mon Sep 17 00:00:00 2001
From: giulcioffi <g.cioffi@arduino.cc>
Date: Mon, 19 Jul 2021 14:42:09 +0200
Subject: [PATCH 096/204] Overwrite old context with new one if they are
different
---
.../CINTERION/GEMALTO_CINTERION_CellularContext.cpp | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularContext.cpp b/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularContext.cpp
index 4aa7f188ea..7ee2c8e53c 100644
--- a/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularContext.cpp
+++ b/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularContext.cpp
@@ -71,12 +71,7 @@ bool GEMALTO_CINTERION_CellularContext::get_context()
int pdp_type_len = _at.read_string(pdp_type_from_context, sizeof(pdp_type_from_context));
if (pdp_type_len > 0) {
apn_len = _at.read_string(apn, sizeof(apn));
- if (apn_len > 0) {
- if (_apn && (strcmp(apn, _apn) != 0)) {
- tr_debug("CID %d APN \"%s\"", cid, apn);
- continue;
- }
-
+ if (apn_len > 0 && (strcmp(apn, _apn) == 0)) {
// APN matched -> Check PDP type
pdp_type_t pdp_type = string_to_pdp_type(pdp_type_from_context);
tr_debug("CID %d APN \"%s\" pdp_type %u", cid, apn, pdp_type);
--
2.39.1