Skip to contentSkip to conversation

common: APN with a dot in second position are not invalid

PATCH Applied Christophe Ronco 2 participants 2 messages Sep 28, 2020 – Sep 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common: APN with a dot in second position are not invalid

APN with a dot in second position (example: "t.est") are wrongly considered invalid.

---
 src/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/common.c +1 -1
index 4dcbc83..f955a76 100644
@@ -709,7 +709,7 @@ const char *registration_tech_to_string(int tech)
 gboolean is_valid_apn(const char *apn)
 {
 	int i;
-	int last_period = 0;
+	int last_period = -1;
 
 	if (apn == NULL)
 		return FALSE;
Signature · 1 line
2.7.4
#1 lore raw

Hi Christophe,

Quoted 6 lines · Christophe Ronco

APN with a dot in second position (example: "t.est") are wrongly considered invalid.

---
  src/common.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis