summaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
authorPekka Pessi <Pekka.Pessi@nokia.com>2010-03-19 19:49:54 +0200
committerDenis Kenzior <denkenz@gmail.com>2010-03-19 13:48:04 -0500
commit9a398a1087ebf3c327dcd3ed8191da33fc0d361b (patch)
treef0f23239935967d79922a3f0628fa5a4624d05d3 /src/common.h
parentc0c682d5c04f1e1b75c624e26c44c9f11e07b44b (diff)
downloadofono-9a398a1087ebf3c327dcd3ed8191da33fc0d361b.tar.bz2
Fix: Check password length based on its type
The different password types have different length requirements, so update is_valid_pin to validate according to the password type being validated (PIN / PUK / NET)
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h
index 2b74dc43..d166f485 100644
--- a/src/common.h
+++ b/src/common.h
@@ -115,6 +115,13 @@ enum ss_cssu {
SS_MT_CALL_DEFLECTED = 9,
};
+enum pin_type {
+ PIN_TYPE_NONE = 0,
+ PIN_TYPE_PIN = 1,
+ PIN_TYPE_PUK = 2,
+ PIN_TYPE_NET = 3,
+};
+
const char *telephony_error_to_str(const struct ofono_error *error);
gboolean valid_phone_number_format(const char *number);
@@ -134,7 +141,7 @@ const char *ss_control_type_to_string(enum ss_control_type type);
const char *bearer_class_to_string(enum bearer_class cls);
-gboolean is_valid_pin(const char *pin);
+gboolean is_valid_pin(const char *pin, enum pin_type type);
const char *registration_status_to_string(int status);
const char *registration_tech_to_string(int tech);