[Bugfix][T106BUG-493]Fix can't setup datacall with IPV6 when username and password are empty
Only Configure: No
Affected branch: master
Affected module: data
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: Ic96281603d429aaf1d71fb175f70b1a9f1c2028e
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
index b497527..105d347 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
@@ -1594,7 +1594,7 @@
return -1;
}
- if(user == NULL || strcmp(user, "NULL") == 0)
+ if(user == NULL || strcmp(user, "NULL") == 0 || strlen(user) == 0)
{
argv[1] = NULL;
}
@@ -1603,7 +1603,7 @@
argv[1] = user;
}
- if(password == NULL || strcmp(password, "NULL") == 0)
+ if(password == NULL || strcmp(password, "NULL") == 0 || strlen(password) == 0)
{
argv[2] = NULL;
}
@@ -1612,7 +1612,7 @@
argv[2] = password;
}
- if(authType == NULL || strcmp(authType, "NULL") == 0)
+ if(authType == NULL || strcmp(authType, "NULL") == 0 || strlen(authType) == 0)
{
argv[3] = NULL;
}
@@ -1620,7 +1620,7 @@
{
argv[3] = authType;
}
- if(normalProtocol==NULL)
+ if(normalProtocol==NULL|| strlen(normalProtocol) == 0)
{
argv[4] = "IPV4V6";
}