diff options
author | Jacek Antonelli | 2008-08-15 23:45:32 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:32 -0500 |
commit | 77c4904770841a44ea74a93dc9741b1fafe35a0e (patch) | |
tree | b7bab4dc6368b2aa8e2b7053ee69b61c7aff1e0b /linden | |
parent | Second Life viewer sources 1.19.0.3 (diff) | |
download | meta-impy-77c4904770841a44ea74a93dc9741b1fafe35a0e.zip meta-impy-77c4904770841a44ea74a93dc9741b1fafe35a0e.tar.gz meta-impy-77c4904770841a44ea74a93dc9741b1fafe35a0e.tar.bz2 meta-impy-77c4904770841a44ea74a93dc9741b1fafe35a0e.tar.xz |
Second Life viewer sources 1.19.0.4
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 44 | ||||
-rw-r--r-- | linden/indra/newview/llfloateractivespeakers.cpp | 18 | ||||
-rw-r--r-- | linden/indra/newview/releasenotes.txt | 8 |
3 files changed, 37 insertions, 33 deletions
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index e3d7073..30ac8fa 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -2610,43 +2610,36 @@ void LLAppViewer::setCrashBehavior(S32 cb) | |||
2610 | 2610 | ||
2611 | bool LLAppViewer::anotherInstanceRunning() | 2611 | bool LLAppViewer::anotherInstanceRunning() |
2612 | { | 2612 | { |
2613 | // We create a marker file when the program starts and remove the file when it finishes. | 2613 | // We create a marker file when the program starts and remove the file when it finishes. |
2614 | // If the file is currently locked, that means another process is already running. | 2614 | // If the file is currently locked, that means another process is already running. |
2615 | 2615 | ||
2616 | std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, MARKER_FILE_NAME); | 2616 | std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, MARKER_FILE_NAME); |
2617 | llinfos << "Checking marker file for lock..." << llendl; | 2617 | llinfos << "Checking marker file for lock..." << llendl; |
2618 | 2618 | ||
2619 | // If file doesn't exist, we create it | 2619 | //Freeze case checks |
2620 | // If file does exist, try to get writing privileges | 2620 | apr_file_t* fMarker = ll_apr_file_open(marker_file, LL_APR_RB); |
2621 | FILE* fMarker = LLFile::fopen(marker_file.c_str(), "rb"); // Flawfinder: ignore | ||
2622 | if (fMarker != NULL) | 2621 | if (fMarker != NULL) |
2623 | { | 2622 | { |
2624 | // File exists, try opening with write permissions | 2623 | // File exists, try opening with write permissions |
2625 | fclose(fMarker); | 2624 | apr_file_close(fMarker); |
2626 | fMarker = LLFile::fopen(marker_file.c_str(), "wb"); // Flawfinder: ignore | 2625 | fMarker = ll_apr_file_open(marker_file, LL_APR_WB); |
2627 | if (fMarker == NULL) | 2626 | if (fMarker == NULL) |
2628 | { | 2627 | { |
2628 | // Another instance is running. Skip the rest of these operations. | ||
2629 | llinfos << "Marker file is locked." << llendl; | 2629 | llinfos << "Marker file is locked." << llendl; |
2630 | return TRUE; | 2630 | return TRUE; |
2631 | } | 2631 | } |
2632 | 2632 | if (apr_file_lock(fMarker, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS) //flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1) | |
2633 | // *FIX:Mani - rather than have this exception here, | ||
2634 | // LLFile::fopen() have consistent behavior across platforms? | ||
2635 | #if LL_DARWIN || LL_LINUX || LL_SOLARIS | ||
2636 | // Try to lock it. On Mac, this is the only way to test if it's actually locked. | ||
2637 | if (flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1) | ||
2638 | { | 2633 | { |
2639 | // Lock failed - somebody else has it. | 2634 | apr_file_close(fMarker); |
2640 | fclose(fMarker); | ||
2641 | llinfos << "Marker file is locked." << llendl; | 2635 | llinfos << "Marker file is locked." << llendl; |
2642 | return TRUE; | 2636 | return TRUE; |
2643 | } | 2637 | } |
2644 | #endif | 2638 | // No other instances; we'll lock this file now & delete on quit. |
2645 | fclose(fMarker); | 2639 | apr_file_close(fMarker); |
2646 | } | 2640 | } |
2647 | llinfos << "Marker file isn't locked." << llendl; | 2641 | llinfos << "Marker file isn't locked." << llendl; |
2648 | return FALSE; | 2642 | return FALSE; |
2649 | |||
2650 | } | 2643 | } |
2651 | 2644 | ||
2652 | void LLAppViewer::initMarkerFile() | 2645 | void LLAppViewer::initMarkerFile() |
@@ -2688,25 +2681,10 @@ void LLAppViewer::initMarkerFile() | |||
2688 | ll_apr_file_remove(error_marker_file); | 2681 | ll_apr_file_remove(error_marker_file); |
2689 | 2682 | ||
2690 | //Freeze case checks | 2683 | //Freeze case checks |
2684 | if(anotherInstanceRunning()) return; | ||
2691 | fMarker = ll_apr_file_open(mMarkerFileName, LL_APR_RB); | 2685 | fMarker = ll_apr_file_open(mMarkerFileName, LL_APR_RB); |
2692 | if (fMarker != NULL) | 2686 | if (fMarker != NULL) |
2693 | { | 2687 | { |
2694 | // File exists, try opening with write permissions | ||
2695 | apr_file_close(fMarker); | ||
2696 | fMarker = ll_apr_file_open(mMarkerFileName, LL_APR_WB); | ||
2697 | if (fMarker == NULL) | ||
2698 | { | ||
2699 | // Another instance is running. Skip the rest of these operations. | ||
2700 | llinfos << "Marker file is locked." << llendl; | ||
2701 | return; | ||
2702 | } | ||
2703 | if (apr_file_lock(fMarker, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS) //flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1) | ||
2704 | { | ||
2705 | apr_file_close(fMarker); | ||
2706 | llinfos << "Marker file is locked." << llendl; | ||
2707 | return; | ||
2708 | } | ||
2709 | // No other instances; we'll lock this file now & delete on quit. | ||
2710 | apr_file_close(fMarker); | 2688 | apr_file_close(fMarker); |
2711 | gLastExecEvent = LAST_EXEC_FROZE; | 2689 | gLastExecEvent = LAST_EXEC_FROZE; |
2712 | llinfos << "Exec marker found: program froze on previous execution" << llendl; | 2690 | llinfos << "Exec marker found: program froze on previous execution" << llendl; |
diff --git a/linden/indra/newview/llfloateractivespeakers.cpp b/linden/indra/newview/llfloateractivespeakers.cpp index 8432d21..21b302a 100644 --- a/linden/indra/newview/llfloateractivespeakers.cpp +++ b/linden/indra/newview/llfloateractivespeakers.cpp | |||
@@ -486,11 +486,16 @@ void LLPanelActiveSpeakers::refreshSpeakers() | |||
486 | LLScrollListCell* name_cell = itemp->getColumn(1); | 486 | LLScrollListCell* name_cell = itemp->getColumn(1); |
487 | if (name_cell) | 487 | if (name_cell) |
488 | { | 488 | { |
489 | //FIXME: remove hard coding of font colors | ||
489 | if (speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL) | 490 | if (speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL) |
490 | { | 491 | { |
491 | // draw inactive speakers in gray | 492 | // draw inactive speakers in gray |
492 | name_cell->setColor(LLColor4::grey4); | 493 | name_cell->setColor(LLColor4::grey4); |
493 | } | 494 | } |
495 | else | ||
496 | { | ||
497 | name_cell->setColor(LLColor4::black); | ||
498 | } | ||
494 | 499 | ||
495 | LLString speaker_name; | 500 | LLString speaker_name; |
496 | if (speakerp->mDisplayName.empty()) | 501 | if (speakerp->mDisplayName.empty()) |
@@ -1294,6 +1299,19 @@ void LLActiveSpeakerMgr::updateSpeakerList() | |||
1294 | mVoiceChannel = LLVoiceChannel::getCurrentVoiceChannel(); | 1299 | mVoiceChannel = LLVoiceChannel::getCurrentVoiceChannel(); |
1295 | } | 1300 | } |
1296 | LLSpeakerMgr::updateSpeakerList(); | 1301 | LLSpeakerMgr::updateSpeakerList(); |
1302 | |||
1303 | // clean up text only speakers | ||
1304 | for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it) | ||
1305 | { | ||
1306 | LLUUID speaker_id = speaker_it->first; | ||
1307 | LLSpeaker* speakerp = speaker_it->second; | ||
1308 | if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) | ||
1309 | { | ||
1310 | // automatically flag text only speakers for removal | ||
1311 | speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; | ||
1312 | } | ||
1313 | } | ||
1314 | |||
1297 | } | 1315 | } |
1298 | 1316 | ||
1299 | 1317 | ||
diff --git a/linden/indra/newview/releasenotes.txt b/linden/indra/newview/releasenotes.txt index 7aa71f9..b7fb7e6 100644 --- a/linden/indra/newview/releasenotes.txt +++ b/linden/indra/newview/releasenotes.txt | |||
@@ -1,3 +1,11 @@ | |||
1 | Release Notes for Second Life 1.19.0(4) February 26th, 2008 | ||
2 | ===================================== | ||
3 | |||
4 | Fixes: | ||
5 | * VWR-4921: not recognising in Linux that client is already running | ||
6 | * VWR-4960: Active Speakers list does not clear in 1.19.0 (2) | ||
7 | |||
8 | |||
1 | Release Notes for Second Life 1.19.0(3) February 22nd, 2008 | 9 | Release Notes for Second Life 1.19.0(3) February 22nd, 2008 |
2 | ===================================== | 10 | ===================================== |
3 | 11 | ||