aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/newview/llstartup.cpp36
-rw-r--r--linden/indra/newview/llstartup.h9
2 files changed, 45 insertions, 0 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 66849b1..d035a4b 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -76,6 +76,7 @@
76#include "llstring.h" 76#include "llstring.h"
77#include "lluserrelations.h" 77#include "lluserrelations.h"
78#include "llvfs.h" 78#include "llvfs.h"
79#include "llxorcipher.h" // saved password, MAC address
79#include "message.h" 80#include "message.h"
80#include "v3math.h" 81#include "v3math.h"
81 82
@@ -261,6 +262,7 @@ bool LLStartUp::sLoginFailed = false;
261 262
262void login_show(); 263void login_show();
263void login_callback(S32 option, void* userdata); 264void login_callback(S32 option, void* userdata);
265bool is_hex_string(U8* str, S32 len);
264void show_first_run_dialog(); 266void show_first_run_dialog();
265bool first_run_dialog_callback(const LLSD& notification, const LLSD& response); 267bool first_run_dialog_callback(const LLSD& notification, const LLSD& response);
266void set_startup_status(const F32 frac, const std::string& string, const std::string& msg); 268void set_startup_status(const F32 frac, const std::string& string, const std::string& msg);
@@ -3242,6 +3244,40 @@ void LLStartUp::deletePasswordFromDisk()
3242 LLFile::remove(filepath); 3244 LLFile::remove(filepath);
3243} 3245}
3244 3246
3247bool is_hex_string(U8* str, S32 len)
3248{
3249 bool rv = true;
3250 U8* c = str;
3251 while(rv && len--)
3252 {
3253 switch(*c)
3254 {
3255 case '0':
3256 case '1':
3257 case '2':
3258 case '3':
3259 case '4':
3260 case '5':
3261 case '6':
3262 case '7':
3263 case '8':
3264 case '9':
3265 case 'a':
3266 case 'b':
3267 case 'c':
3268 case 'd':
3269 case 'e':
3270 case 'f':
3271 ++c;
3272 break;
3273 default:
3274 rv = false;
3275 break;
3276 }
3277 }
3278 return rv;
3279}
3280
3245void show_first_run_dialog() 3281void show_first_run_dialog()
3246{ 3282{
3247 LLNotifications::instance().add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback); 3283 LLNotifications::instance().add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback);
diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h
index 5960817..619066c 100644
--- a/linden/indra/newview/llstartup.h
+++ b/linden/indra/newview/llstartup.h
@@ -106,7 +106,16 @@ public:
106 // gender_name is either "male" or "female" 106 // gender_name is either "male" or "female"
107 static void loadInitialOutfit( const std::string& outfit_folder_name, 107 static void loadInitialOutfit( const std::string& outfit_folder_name,
108 const std::string& gender_name ); 108 const std::string& gender_name );
109
110 // Load MD5 of user's password from local disk file.
111 static std::string loadPasswordFromDisk();
112
113 // Record MD5 of user's password for subsequent login.
114 static void savePasswordToDisk(const std::string& hashed_password);
109 115
116 // Delete the saved password local disk file.
117 static void deletePasswordFromDisk();
118
110 static bool dispatchURL(); 119 static bool dispatchURL();
111 // if we have a SLURL or sim string ("Ahern/123/45") that started 120 // if we have a SLURL or sim string ("Ahern/123/45") that started
112 // the viewer, dispatch it 121 // the viewer, dispatch it