Преглед изворни кода

only call login function when the login was successful

stefan пре 1 година
родитељ
комит
8ddd166b3e
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      src/shellmatta_auth.c

+ 1 - 2
src/shellmatta_auth.c

@@ -149,9 +149,8 @@ void checkPassword(shellmatta_handle_t handle, uint32_t userId, char *password)
     else
     {
         shellmatta_write(handle, "login successful\r\n", 18);
+        (void)shellmatta_auth_login(handle, approvedUserId);
     }
-
-    (void)shellmatta_auth_login(handle, approvedUserId);
 }
 
 /**