From e3b451824978b42da26b01637a51101a0f13586c Mon Sep 17 00:00:00 2001 From: Hazim Gazov Date: Sat, 1 May 2010 17:00:53 -0300 Subject: [PATCH] just use llformat, hurr durr --- indra/newview/lluserauth.cpp | 84 +++++++++++++++++------------------- 1 file changed, 40 insertions(+), 44 deletions(-) diff --git a/indra/newview/lluserauth.cpp b/indra/newview/lluserauth.cpp index cdae9f40d..f8d85f0cc 100644 --- a/indra/newview/lluserauth.cpp +++ b/indra/newview/lluserauth.cpp @@ -49,10 +49,6 @@ #include #include -// -#include -// - // Don't define PLATFORM_STRING for unknown platforms - they need // to get added to the login cgi script, so we want this to cause an @@ -134,35 +130,35 @@ void LLUserAuth::authenticate( XMLRPC_VectorAppendString(params, "last", lastname.c_str(), 0); XMLRPC_VectorAppendString(params, "web_login_key", web_login_key.getString().c_str(), 0); XMLRPC_VectorAppendString(params, "start", start.c_str(), 0); - // - //XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name + // + //XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name //XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0); //WOW NEIL YOU ARE SO AWESOME!! - + XMLRPC_VectorAppendString(params, "version", std::string( gSavedSettings.getString("SpecifiedChannel") + " " + - boost::lexical_cast(gSavedSettings.getU32("SpecifiedVersionMaj")) + "." + - boost::lexical_cast(gSavedSettings.getU32("SpecifiedVersionMin")) + "." + - boost::lexical_cast(gSavedSettings.getU32("SpecifiedVersionPatch")) + "." + - boost::lexical_cast(gSavedSettings.getU32("SpecifiedVersionBuild")) + llformat("%d", gSavedSettings.getU32("SpecifiedVersionMaj")) + "." + + llformat("%d", gSavedSettings.getU32("SpecifiedVersionMin")) + "." + + llformat("%d", gSavedSettings.getU32("SpecifiedVersionPatch")) + "." + + llformat("%d", gSavedSettings.getU32("SpecifiedVersionBuild")) ).c_str(), 0); // Includes channel name - - XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("SpecifiedChannel").c_str(), 0); - // + + XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("SpecifiedChannel").c_str(), 0); + // XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); - // - if(gSavedSettings.getBOOL("SpecifyMAC")) - XMLRPC_VectorAppendString(params, "mac", gSavedSettings.getString("SpecifiedMAC").c_str(), 0); - else - // + // + if(gSavedSettings.getBOOL("SpecifyMAC")) + XMLRPC_VectorAppendString(params, "mac", gSavedSettings.getString("SpecifiedMAC").c_str(), 0); + else + // XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); // A bit of security through obscurity: id0 is volume_serial - // - if(gSavedSettings.getBOOL("SpecifyID0")) - XMLRPC_VectorAppendString(params, "id0", gSavedSettings.getString("SpecifiedID0").c_str(), 0); - else - // + // + if(gSavedSettings.getBOOL("SpecifyID0")) + XMLRPC_VectorAppendString(params, "id0", gSavedSettings.getString("SpecifiedID0").c_str(), 0); + else + // XMLRPC_VectorAppendString(params, "id0", hashed_volume_serial.c_str(), 0); if (skip_optional) { @@ -244,35 +240,35 @@ void LLUserAuth::authenticate( XMLRPC_VectorAppendString(params, "last", lastname.c_str(), 0); XMLRPC_VectorAppendString(params, "passwd", dpasswd.c_str(), 0); XMLRPC_VectorAppendString(params, "start", start.c_str(), 0); - // - //XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name - //XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0); + // + //XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name + //XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0); //WOW NEIL YOU ARE SO AWESOME!! XMLRPC_VectorAppendString(params, "version", std::string( gSavedSettings.getString("SpecifiedChannel") + " " + - boost::lexical_cast(gSavedSettings.getU32("SpecifiedVersionMaj")) + "." + - boost::lexical_cast(gSavedSettings.getU32("SpecifiedVersionMin")) + "." + - boost::lexical_cast(gSavedSettings.getU32("SpecifiedVersionPatch")) + "." + - boost::lexical_cast(gSavedSettings.getU32("SpecifiedVersionBuild")) + llformat("%d", gSavedSettings.getU32("SpecifiedVersionMaj")) + "." + + llformat("%d", gSavedSettings.getU32("SpecifiedVersionMin")) + "." + + llformat("%d", gSavedSettings.getU32("SpecifiedVersionPatch")) + "." + + llformat("%d", gSavedSettings.getU32("SpecifiedVersionBuild")) ).c_str(), 0); // Includes channel name - - XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("SpecifiedChannel").c_str(), 0); - // + + XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("SpecifiedChannel").c_str(), 0); + // XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); - // - if(gSavedSettings.getBOOL("SpecifyMAC")) - XMLRPC_VectorAppendString(params, "mac", gSavedSettings.getString("SpecifiedMAC").c_str(), 0); - else - // + // + if(gSavedSettings.getBOOL("SpecifyMAC")) + XMLRPC_VectorAppendString(params, "mac", gSavedSettings.getString("SpecifiedMAC").c_str(), 0); + else + // XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); // A bit of security through obscurity: id0 is volume_serial - // - if(gSavedSettings.getBOOL("SpecifyID0")) - XMLRPC_VectorAppendString(params, "id0", gSavedSettings.getString("SpecifiedID0").c_str(), 0); - else - // + // + if(gSavedSettings.getBOOL("SpecifyID0")) + XMLRPC_VectorAppendString(params, "id0", gSavedSettings.getString("SpecifiedID0").c_str(), 0); + else + // XMLRPC_VectorAppendString(params, "id0", hashed_volume_serial.c_str(), 0); if (skip_optional) {