gprs: support for NONE auth type

This commit is contained in:
Giacinto Cifelli 2018-10-06 07:45:18 +02:00 committed by Denis Kenzior
parent 6cf24fe1f9
commit cc79162470
1 changed files with 5 additions and 0 deletions

View File

@ -261,6 +261,8 @@ static const char *gprs_auth_method_to_string(enum ofono_gprs_auth_method auth)
return "chap";
case OFONO_GPRS_AUTH_METHOD_PAP:
return "pap";
case OFONO_GPRS_AUTH_METHOD_NONE:
return "none";
};
return NULL;
@ -275,6 +277,9 @@ static gboolean gprs_auth_method_from_string(const char *str,
} else if (g_str_equal(str, "pap")) {
*auth = OFONO_GPRS_AUTH_METHOD_PAP;
return TRUE;
} else if (g_str_equal(str, "none")) {
*auth = OFONO_GPRS_AUTH_METHOD_NONE;
return TRUE;
}
return FALSE;