summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/device-functions.c b/device-functions.c
index 8812cfa..516bbc9 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -4645,3 +4645,23 @@ int IO_Setup_RS232(int baud, char hardhand, gboolean update_flash)
return OK;
}
+int change_password (gchar *old_password, gchar *new_password) {
+
+ gboolean old_valid = TRUE;
+
+ // Skip password check if the supplied old_password is NULL. This
+ // only happens when resetting the password to the default.
+ if (old_password != NULL) {
+ printf ("verifying old password: %s\n", old_password); //FIXME with real function
+ // check, and set old_valid = FALSE if the password check fails
+ }
+
+ if (old_valid == TRUE) {
+ printf ("setting new password: %s\n" ,new_password); //FIXME with real function
+ // is a success test required?
+ return OK;
+ } else {
+ return password_change_error;
+ }
+}
+