summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewerlinux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewerlinux.cpp')
-rw-r--r--indra/newview/llappviewerlinux.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index d02e86a557..d34bcb4a68 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -188,7 +188,7 @@ static inline BOOL do_basic_glibc_backtrace()
for (i = 0; i < size; i++)
{
// the format of the StraceFile is very specific, to allow (kludgy) machine-parsing
- fprintf(StraceFile, "%-3d ", i);
+ fprintf(StraceFile, "%-3lu ", (unsigned long)i);
fprintf(StraceFile, "%-32s\t", "unknown");
fprintf(StraceFile, "%p ", stackarray[i]);
fprintf(StraceFile, "%s\n", strings[i]);
@@ -263,7 +263,7 @@ static inline BOOL do_elfio_glibc_backtrace()
for (btpos = 0; btpos < btsize; ++btpos)
{
// the format of the StraceFile is very specific, to allow (kludgy) machine-parsing
- fprintf(StraceFile, "%-3d ", btpos);
+ fprintf(StraceFile, "%-3ld ", (long)btpos);
int symidx;
for (symidx = 0; symidx < nSymNo; ++symidx)
{
@@ -354,7 +354,7 @@ bool LLAppViewerLinux::init()
bool LLAppViewerLinux::restoreErrorTrap()
{
- // *NOTE:Mani there is a case for implementing this or the mac.
+ // *NOTE:Mani there is a case for implementing this on the mac.
// Linux doesn't need it to my knowledge.
return true;
}
@@ -451,7 +451,7 @@ gboolean viewer_app_api_GoSLURL(ViewerAppAPI *obj, gchar *slurl, gboolean **succ
llinfos << "Was asked to go to slurl: " << slurl << llendl;
std::string url = slurl;
- LLWebBrowserCtrl* web = NULL;
+ LLMediaCtrl* web = NULL;
const bool trusted_browser = false;
if (LLURLDispatcher::dispatch(url, web, trusted_browser))
{
@@ -553,7 +553,7 @@ void LLAppViewerLinux::handleSyncCrashTrace()
void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
{
- std::string cmd =gDirUtilp->getAppRODataDir();
+ std::string cmd =gDirUtilp->getExecutableDir();
cmd += gDirUtilp->getDirDelimiter();
#if LL_LINUX
cmd += "linux-crash-logger.bin";
@@ -727,8 +727,26 @@ std::string LLAppViewerLinux::generateSerialNumber()
{
char serial_md5[MD5HEX_STR_SIZE];
serial_md5[0] = 0;
+ std::string best;
+ std::string uuiddir("/dev/disk/by-uuid/");
- // TODO
+ // trawl /dev/disk/by-uuid looking for a good-looking UUID to grab
+ std::string this_name;
+ BOOL wrap = FALSE;
+ while (gDirUtilp->getNextFileInDir(uuiddir, "*", this_name, wrap))
+ {
+ if (this_name.length() > best.length() ||
+ (this_name.length() == best.length() &&
+ this_name > best))
+ {
+ // longest (and secondarily alphabetically last) so far
+ best = this_name;
+ }
+ }
+
+ // we don't return the actual serial number, just a hash of it.
+ LLMD5 md5( reinterpret_cast<const unsigned char*>(best.c_str()) );
+ md5.hex_digest(serial_md5);
return serial_md5;
}