diff options
Diffstat (limited to 'linden')
45 files changed, 771 insertions, 472 deletions
diff --git a/linden/indra/cmake/Audio.cmake b/linden/indra/cmake/Audio.cmake index d23bc2f..10d11bb 100644 --- a/linden/indra/cmake/Audio.cmake +++ b/linden/indra/cmake/Audio.cmake | |||
@@ -32,6 +32,12 @@ else (STANDALONE) | |||
32 | set(VORBISENC_LIBRARIES vorbisenc) | 32 | set(VORBISENC_LIBRARIES vorbisenc) |
33 | set(VORBISFILE_LIBRARIES vorbisfile) | 33 | set(VORBISFILE_LIBRARIES vorbisfile) |
34 | endif (WINDOWS) | 34 | endif (WINDOWS) |
35 | if(LINUX AND ${ARCH} STREQUAL "x86_64") | ||
36 | set(VORBIS_LIBRARY_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib) | ||
37 | set(VORBISENC_LIBRARY_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib) | ||
38 | set(VORBISFILE_LIBRARY_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib) | ||
39 | set(OGG_LIBRARY_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib) | ||
40 | endif(LINUX AND ${ARCH} STREQUAL "x86_64") | ||
35 | endif (STANDALONE) | 41 | endif (STANDALONE) |
36 | 42 | ||
37 | link_directories( | 43 | link_directories( |
@@ -40,3 +46,13 @@ link_directories( | |||
40 | ${VORBISFILE_LIBRARY_DIRS} | 46 | ${VORBISFILE_LIBRARY_DIRS} |
41 | ${OGG_LIBRARY_DIRS} | 47 | ${OGG_LIBRARY_DIRS} |
42 | ) | 48 | ) |
49 | |||
50 | if(NOT vorbis_link_msg) | ||
51 | set(vorbis_link_msg ON CACHE BOOL "ogg vorbis linked from:\n") | ||
52 | message("ogg vorbis linked from:\n" | ||
53 | ${VORBIS_LIBRARY_DIRS} "\n" | ||
54 | ${VORBISENC_LIBRARY_DIRS} "\n" | ||
55 | ${VORBISFILE_LIBRARY_DIRS} "\n" | ||
56 | ${OGG_LIBRARY_DIRS} "\n" | ||
57 | ) | ||
58 | endif(NOT vorbis_link_msg) | ||
diff --git a/linden/indra/cmake/LLWindow.cmake b/linden/indra/cmake/LLWindow.cmake index 1023693..345359a 100644 --- a/linden/indra/cmake/LLWindow.cmake +++ b/linden/indra/cmake/LLWindow.cmake | |||
@@ -45,4 +45,7 @@ else (SERVER AND LINUX) | |||
45 | comdlg32 | 45 | comdlg32 |
46 | ) | 46 | ) |
47 | endif (WINDOWS) | 47 | endif (WINDOWS) |
48 | if (LINUX) | ||
49 | list(APPEND LLWINDOW_LIBRARIES fontconfig) | ||
50 | endif (LINUX) | ||
48 | endif (SERVER AND LINUX) | 51 | endif (SERVER AND LINUX) |
diff --git a/linden/indra/llcommon/CMakeLists.txt b/linden/indra/llcommon/CMakeLists.txt index ed04ca6..b6015a8 100644 --- a/linden/indra/llcommon/CMakeLists.txt +++ b/linden/indra/llcommon/CMakeLists.txt | |||
@@ -200,7 +200,7 @@ set_source_files_properties(${llcommon_HEADER_FILES} | |||
200 | list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) | 200 | list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) |
201 | 201 | ||
202 | add_library (llcommon SHARED ${llcommon_SOURCE_FILES}) | 202 | add_library (llcommon SHARED ${llcommon_SOURCE_FILES}) |
203 | target_link_libraries( | 203 | set (llcommon_link_LIBRARIES |
204 | llcommon | 204 | llcommon |
205 | ${APRUTIL_LIBRARIES} | 205 | ${APRUTIL_LIBRARIES} |
206 | ${APR_LIBRARIES} | 206 | ${APR_LIBRARIES} |
@@ -218,3 +218,11 @@ if (DARWIN) | |||
218 | INSTALL_NAME_DIR "@executable_path/../Resources" | 218 | INSTALL_NAME_DIR "@executable_path/../Resources" |
219 | ) | 219 | ) |
220 | endif (DARWIN) | 220 | endif (DARWIN) |
221 | |||
222 | if (LINUX) | ||
223 | list(APPEND llcommon_link_LIBRARIES rt) | ||
224 | endif (LINUX) | ||
225 | |||
226 | target_link_libraries( | ||
227 | ${llcommon_link_LIBRARIES} | ||
228 | ) | ||
diff --git a/linden/indra/llcommon/llsdserialize.cpp b/linden/indra/llcommon/llsdserialize.cpp index 9f4ce64..e2be922 100644 --- a/linden/indra/llcommon/llsdserialize.cpp +++ b/linden/indra/llcommon/llsdserialize.cpp | |||
@@ -441,7 +441,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
441 | } | 441 | } |
442 | if(istr.fail()) | 442 | if(istr.fail()) |
443 | { | 443 | { |
444 | llinfos << "STREAM FAILURE reading map." << llendl; | 444 | llwarns << "STREAM FAILURE reading map." << llendl; |
445 | parse_count = PARSE_FAILURE; | 445 | parse_count = PARSE_FAILURE; |
446 | } | 446 | } |
447 | break; | 447 | break; |
@@ -460,7 +460,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
460 | } | 460 | } |
461 | if(istr.fail()) | 461 | if(istr.fail()) |
462 | { | 462 | { |
463 | llinfos << "STREAM FAILURE reading array." << llendl; | 463 | llwarns << "STREAM FAILURE reading array." << llendl; |
464 | parse_count = PARSE_FAILURE; | 464 | parse_count = PARSE_FAILURE; |
465 | } | 465 | } |
466 | break; | 466 | break; |
@@ -496,7 +496,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
496 | } | 496 | } |
497 | if(istr.fail()) | 497 | if(istr.fail()) |
498 | { | 498 | { |
499 | llinfos << "STREAM FAILURE reading boolean." << llendl; | 499 | llwarns << "STREAM FAILURE reading boolean." << llendl; |
500 | parse_count = PARSE_FAILURE; | 500 | parse_count = PARSE_FAILURE; |
501 | } | 501 | } |
502 | break; | 502 | break; |
@@ -522,7 +522,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
522 | } | 522 | } |
523 | if(istr.fail()) | 523 | if(istr.fail()) |
524 | { | 524 | { |
525 | llinfos << "STREAM FAILURE reading boolean." << llendl; | 525 | llwarns << "STREAM FAILURE reading boolean." << llendl; |
526 | parse_count = PARSE_FAILURE; | 526 | parse_count = PARSE_FAILURE; |
527 | } | 527 | } |
528 | break; | 528 | break; |
@@ -535,7 +535,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
535 | data = integer; | 535 | data = integer; |
536 | if(istr.fail()) | 536 | if(istr.fail()) |
537 | { | 537 | { |
538 | llinfos << "STREAM FAILURE reading integer." << llendl; | 538 | llwarns << "STREAM FAILURE reading integer." << llendl; |
539 | parse_count = PARSE_FAILURE; | 539 | parse_count = PARSE_FAILURE; |
540 | } | 540 | } |
541 | break; | 541 | break; |
@@ -549,7 +549,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
549 | data = real; | 549 | data = real; |
550 | if(istr.fail()) | 550 | if(istr.fail()) |
551 | { | 551 | { |
552 | llinfos << "STREAM FAILURE reading real." << llendl; | 552 | llwarns << "STREAM FAILURE reading real." << llendl; |
553 | parse_count = PARSE_FAILURE; | 553 | parse_count = PARSE_FAILURE; |
554 | } | 554 | } |
555 | break; | 555 | break; |
@@ -563,7 +563,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
563 | data = id; | 563 | data = id; |
564 | if(istr.fail()) | 564 | if(istr.fail()) |
565 | { | 565 | { |
566 | llinfos << "STREAM FAILURE reading uuid." << llendl; | 566 | llwarns << "STREAM FAILURE reading uuid." << llendl; |
567 | parse_count = PARSE_FAILURE; | 567 | parse_count = PARSE_FAILURE; |
568 | } | 568 | } |
569 | break; | 569 | break; |
@@ -578,7 +578,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
578 | } | 578 | } |
579 | if(istr.fail()) | 579 | if(istr.fail()) |
580 | { | 580 | { |
581 | llinfos << "STREAM FAILURE reading string." << llendl; | 581 | llwarns << "STREAM FAILURE reading string." << llendl; |
582 | parse_count = PARSE_FAILURE; | 582 | parse_count = PARSE_FAILURE; |
583 | } | 583 | } |
584 | break; | 584 | break; |
@@ -600,7 +600,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
600 | } | 600 | } |
601 | if(istr.fail()) | 601 | if(istr.fail()) |
602 | { | 602 | { |
603 | llinfos << "STREAM FAILURE reading link." << llendl; | 603 | llwarns << "STREAM FAILURE reading link." << llendl; |
604 | parse_count = PARSE_FAILURE; | 604 | parse_count = PARSE_FAILURE; |
605 | } | 605 | } |
606 | break; | 606 | break; |
@@ -623,7 +623,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
623 | } | 623 | } |
624 | if(istr.fail()) | 624 | if(istr.fail()) |
625 | { | 625 | { |
626 | llinfos << "STREAM FAILURE reading date." << llendl; | 626 | llwarns << "STREAM FAILURE reading date." << llendl; |
627 | parse_count = PARSE_FAILURE; | 627 | parse_count = PARSE_FAILURE; |
628 | } | 628 | } |
629 | break; | 629 | break; |
@@ -636,14 +636,14 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const | |||
636 | } | 636 | } |
637 | if(istr.fail()) | 637 | if(istr.fail()) |
638 | { | 638 | { |
639 | llinfos << "STREAM FAILURE reading data." << llendl; | 639 | llwarns << "STREAM FAILURE reading data." << llendl; |
640 | parse_count = PARSE_FAILURE; | 640 | parse_count = PARSE_FAILURE; |
641 | } | 641 | } |
642 | break; | 642 | break; |
643 | 643 | ||
644 | default: | 644 | default: |
645 | parse_count = PARSE_FAILURE; | 645 | parse_count = PARSE_FAILURE; |
646 | llinfos << "Unrecognized character while parsing: int(" << (int)c | 646 | llwarns << "Unrecognized character while parsing: int(" << (int)c |
647 | << ")" << llendl; | 647 | << ")" << llendl; |
648 | break; | 648 | break; |
649 | } | 649 | } |
@@ -905,7 +905,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
905 | } | 905 | } |
906 | if(istr.fail()) | 906 | if(istr.fail()) |
907 | { | 907 | { |
908 | llinfos << "STREAM FAILURE reading binary map." << llendl; | 908 | llwarns << "STREAM FAILURE reading binary map." << llendl; |
909 | parse_count = PARSE_FAILURE; | 909 | parse_count = PARSE_FAILURE; |
910 | } | 910 | } |
911 | break; | 911 | break; |
@@ -924,7 +924,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
924 | } | 924 | } |
925 | if(istr.fail()) | 925 | if(istr.fail()) |
926 | { | 926 | { |
927 | llinfos << "STREAM FAILURE reading binary array." << llendl; | 927 | llwarns << "STREAM FAILURE reading binary array." << llendl; |
928 | parse_count = PARSE_FAILURE; | 928 | parse_count = PARSE_FAILURE; |
929 | } | 929 | } |
930 | break; | 930 | break; |
@@ -949,7 +949,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
949 | data = (S32)ntohl(value_nbo); | 949 | data = (S32)ntohl(value_nbo); |
950 | if(istr.fail()) | 950 | if(istr.fail()) |
951 | { | 951 | { |
952 | llinfos << "STREAM FAILURE reading binary integer." << llendl; | 952 | llwarns << "STREAM FAILURE reading binary integer." << llendl; |
953 | } | 953 | } |
954 | break; | 954 | break; |
955 | } | 955 | } |
@@ -961,7 +961,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
961 | data = ll_ntohd(real_nbo); | 961 | data = ll_ntohd(real_nbo); |
962 | if(istr.fail()) | 962 | if(istr.fail()) |
963 | { | 963 | { |
964 | llinfos << "STREAM FAILURE reading binary real." << llendl; | 964 | llwarns << "STREAM FAILURE reading binary real." << llendl; |
965 | } | 965 | } |
966 | break; | 966 | break; |
967 | } | 967 | } |
@@ -973,7 +973,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
973 | data = id; | 973 | data = id; |
974 | if(istr.fail()) | 974 | if(istr.fail()) |
975 | { | 975 | { |
976 | llinfos << "STREAM FAILURE reading binary uuid." << llendl; | 976 | llwarns << "STREAM FAILURE reading binary uuid." << llendl; |
977 | } | 977 | } |
978 | break; | 978 | break; |
979 | } | 979 | } |
@@ -994,7 +994,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
994 | } | 994 | } |
995 | if(istr.fail()) | 995 | if(istr.fail()) |
996 | { | 996 | { |
997 | llinfos << "STREAM FAILURE reading binary (notation-style) string." | 997 | llwarns << "STREAM FAILURE reading binary (notation-style) string." |
998 | << llendl; | 998 | << llendl; |
999 | parse_count = PARSE_FAILURE; | 999 | parse_count = PARSE_FAILURE; |
1000 | } | 1000 | } |
@@ -1014,7 +1014,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1014 | } | 1014 | } |
1015 | if(istr.fail()) | 1015 | if(istr.fail()) |
1016 | { | 1016 | { |
1017 | llinfos << "STREAM FAILURE reading binary string." << llendl; | 1017 | llwarns << "STREAM FAILURE reading binary string." << llendl; |
1018 | parse_count = PARSE_FAILURE; | 1018 | parse_count = PARSE_FAILURE; |
1019 | } | 1019 | } |
1020 | break; | 1020 | break; |
@@ -1033,7 +1033,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1033 | } | 1033 | } |
1034 | if(istr.fail()) | 1034 | if(istr.fail()) |
1035 | { | 1035 | { |
1036 | llinfos << "STREAM FAILURE reading binary link." << llendl; | 1036 | llwarns << "STREAM FAILURE reading binary link." << llendl; |
1037 | parse_count = PARSE_FAILURE; | 1037 | parse_count = PARSE_FAILURE; |
1038 | } | 1038 | } |
1039 | break; | 1039 | break; |
@@ -1046,7 +1046,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1046 | data = LLDate(real); | 1046 | data = LLDate(real); |
1047 | if(istr.fail()) | 1047 | if(istr.fail()) |
1048 | { | 1048 | { |
1049 | llinfos << "STREAM FAILURE reading binary date." << llendl; | 1049 | llwarns << "STREAM FAILURE reading binary date." << llendl; |
1050 | parse_count = PARSE_FAILURE; | 1050 | parse_count = PARSE_FAILURE; |
1051 | } | 1051 | } |
1052 | break; | 1052 | break; |
@@ -1075,7 +1075,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1075 | } | 1075 | } |
1076 | if(istr.fail()) | 1076 | if(istr.fail()) |
1077 | { | 1077 | { |
1078 | llinfos << "STREAM FAILURE reading binary." << llendl; | 1078 | llwarns << "STREAM FAILURE reading binary." << llendl; |
1079 | parse_count = PARSE_FAILURE; | 1079 | parse_count = PARSE_FAILURE; |
1080 | } | 1080 | } |
1081 | break; | 1081 | break; |
@@ -1083,7 +1083,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const | |||
1083 | 1083 | ||
1084 | default: | 1084 | default: |
1085 | parse_count = PARSE_FAILURE; | 1085 | parse_count = PARSE_FAILURE; |
1086 | llinfos << "Unrecognized character while parsing: int(" << (int)c | 1086 | llwarns << "Unrecognized character while parsing: int(" << (int)c |
1087 | << ")" << llendl; | 1087 | << ")" << llendl; |
1088 | break; | 1088 | break; |
1089 | } | 1089 | } |
diff --git a/linden/indra/llcommon/llsdserialize_xml.cpp b/linden/indra/llcommon/llsdserialize_xml.cpp index 33206b4..dab6c1d 100644 --- a/linden/indra/llcommon/llsdserialize_xml.cpp +++ b/linden/indra/llcommon/llsdserialize_xml.cpp | |||
@@ -391,6 +391,14 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) | |||
391 | 391 | ||
392 | if (status == XML_STATUS_ERROR) | 392 | if (status == XML_STATUS_ERROR) |
393 | { | 393 | { |
394 | std::string error_string( XML_ErrorString(XML_GetErrorCode( mParser ))); | ||
395 | if ("parsing aborted" != error_string )//end of input | ||
396 | { | ||
397 | S32 line_number = XML_GetCurrentLineNumber( mParser ); | ||
398 | llwarns << "LLXmlTree parse failed. Line " << line_number << ": " | ||
399 | << error_string << llendl; | ||
400 | } | ||
401 | |||
394 | break; | 402 | break; |
395 | } | 403 | } |
396 | } | 404 | } |
@@ -408,7 +416,8 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) | |||
408 | { | 416 | { |
409 | ((char*) buffer)[count ? count - 1 : 0] = '\0'; | 417 | ((char*) buffer)[count ? count - 1 : 0] = '\0'; |
410 | } | 418 | } |
411 | llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl; | 419 | |
420 | |||
412 | data = LLSD(); | 421 | data = LLSD(); |
413 | return LLSDParser::PARSE_FAILURE; | 422 | return LLSDParser::PARSE_FAILURE; |
414 | } | 423 | } |
@@ -486,7 +495,13 @@ S32 LLSDXMLParser::Impl::parseLines(std::istream& input, LLSD& data) | |||
486 | if (status == XML_STATUS_ERROR | 495 | if (status == XML_STATUS_ERROR |
487 | && !mGracefullStop) | 496 | && !mGracefullStop) |
488 | { | 497 | { |
489 | llinfos << "LLSDXMLParser::Impl::parseLines: XML_STATUS_ERROR" << llendl; | 498 | std::string error_string( XML_ErrorString(XML_GetErrorCode( mParser ))); |
499 | if ("parsing aborted" != error_string )//end of input | ||
500 | { | ||
501 | S32 line_number = XML_GetCurrentLineNumber( mParser ); | ||
502 | llwarns << "LLXmlTree parse failed. Line " << line_number << ": " | ||
503 | << error_string << llendl; | ||
504 | } | ||
490 | return LLSDParser::PARSE_FAILURE; | 505 | return LLSDParser::PARSE_FAILURE; |
491 | } | 506 | } |
492 | 507 | ||
@@ -552,7 +567,9 @@ void LLSDXMLParser::Impl::parsePart(const char* buf, int len) | |||
552 | XML_Status status = XML_Parse(mParser, buf, len, false); | 567 | XML_Status status = XML_Parse(mParser, buf, len, false); |
553 | if (status == XML_STATUS_ERROR) | 568 | if (status == XML_STATUS_ERROR) |
554 | { | 569 | { |
555 | llinfos << "Unexpected XML parsing error at start" << llendl; | 570 | std::string error_string( XML_ErrorString(XML_GetErrorCode( mParser )) ); |
571 | |||
572 | llwarns << "Unexpected XML parsing error at start: " << error_string << llendl; | ||
556 | } | 573 | } |
557 | } | 574 | } |
558 | } | 575 | } |
diff --git a/linden/indra/llmessage/CMakeLists.txt b/linden/indra/llmessage/CMakeLists.txt index b3f2b4c..61b6418 100644 --- a/linden/indra/llmessage/CMakeLists.txt +++ b/linden/indra/llmessage/CMakeLists.txt | |||
@@ -208,13 +208,21 @@ set_source_files_properties(${llmessage_HEADER_FILES} | |||
208 | list(APPEND llmessage_SOURCE_FILES ${llmessage_HEADER_FILES}) | 208 | list(APPEND llmessage_SOURCE_FILES ${llmessage_HEADER_FILES}) |
209 | 209 | ||
210 | add_library (llmessage ${llmessage_SOURCE_FILES}) | 210 | add_library (llmessage ${llmessage_SOURCE_FILES}) |
211 | target_link_libraries( | 211 | set (llmessage_link_LIBRARIES |
212 | llmessage | 212 | llmessage |
213 | ${CURL_LIBRARIES} | 213 | ${CURL_LIBRARIES} |
214 | ${CARES_LIBRARIES} | 214 | ${CARES_LIBRARIES} |
215 | ${OPENSSL_LIBRARIES} | 215 | ${OPENSSL_LIBRARIES} |
216 | ${CRYPTO_LIBRARIES} | 216 | ${CRYPTO_LIBRARIES} |
217 | ${XMLRPCEPI_LIBRARIES} | 217 | ${XMLRPCEPI_LIBRARIES} |
218 | ) | ||
219 | if (LINUX) | ||
220 | list(APPEND llmessage_link_LIBRARIES pthread) | ||
221 | endif (LINUX) | ||
222 | |||
223 | target_link_libraries( | ||
224 | ${llmessage_link_LIBRARIES} | ||
225 | |||
218 | ) | 226 | ) |
219 | 227 | ||
220 | IF (NOT LINUX AND VIEWER) | 228 | IF (NOT LINUX AND VIEWER) |
diff --git a/linden/indra/llplugin/llpluginclassmedia.cpp b/linden/indra/llplugin/llpluginclassmedia.cpp index f0a44f7..31a9d1d 100755 --- a/linden/indra/llplugin/llpluginclassmedia.cpp +++ b/linden/indra/llplugin/llpluginclassmedia.cpp | |||
@@ -1143,6 +1143,15 @@ void LLPluginClassMedia::setBrowserUserAgent(const std::string& user_agent) | |||
1143 | sendMessage(message); | 1143 | sendMessage(message); |
1144 | } | 1144 | } |
1145 | 1145 | ||
1146 | #if LL_WINDOWS | ||
1147 | void LLPluginClassMedia::showConsole() | ||
1148 | { | ||
1149 | LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "show_console"); | ||
1150 | |||
1151 | sendMessage(message); | ||
1152 | } | ||
1153 | #endif | ||
1154 | |||
1146 | void LLPluginClassMedia::crashPlugin() | 1155 | void LLPluginClassMedia::crashPlugin() |
1147 | { | 1156 | { |
1148 | LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "crash"); | 1157 | LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "crash"); |
diff --git a/linden/indra/llplugin/llpluginclassmedia.h b/linden/indra/llplugin/llpluginclassmedia.h index 0004971..098312d 100755 --- a/linden/indra/llplugin/llpluginclassmedia.h +++ b/linden/indra/llplugin/llpluginclassmedia.h | |||
@@ -229,6 +229,11 @@ public: | |||
229 | std::string getMediaName() const { return mMediaName; }; | 229 | std::string getMediaName() const { return mMediaName; }; |
230 | std::string getMediaDescription() const { return mMediaDescription; }; | 230 | std::string getMediaDescription() const { return mMediaDescription; }; |
231 | 231 | ||
232 | #if LL_WINDOWS | ||
233 | //Open a debug console for this plugin. | ||
234 | void showConsole(); | ||
235 | #endif | ||
236 | |||
232 | // Crash the plugin. If you use this outside of a testbed, you will be punished. | 237 | // Crash the plugin. If you use this outside of a testbed, you will be punished. |
233 | void crashPlugin(); | 238 | void crashPlugin(); |
234 | 239 | ||
diff --git a/linden/indra/llplugin/llpluginmessage.cpp b/linden/indra/llplugin/llpluginmessage.cpp index 0810a04..9c4940a 100755 --- a/linden/indra/llplugin/llpluginmessage.cpp +++ b/linden/indra/llplugin/llpluginmessage.cpp | |||
@@ -368,7 +368,8 @@ std::string LLPluginMessage::generate(void) const | |||
368 | 368 | ||
369 | // Pretty XML may be slightly easier to deal with while debugging... | 369 | // Pretty XML may be slightly easier to deal with while debugging... |
370 | // LLSDSerialize::toXML(mMessage, result); | 370 | // LLSDSerialize::toXML(mMessage, result); |
371 | LLSDSerialize::toPrettyXML(mMessage, result); | 371 | // LLSDSerialize::toPrettyXML(mMessage, result); |
372 | result << mMessage; | ||
372 | 373 | ||
373 | return result.str(); | 374 | return result.str(); |
374 | } | 375 | } |
@@ -383,10 +384,12 @@ int LLPluginMessage::parse(const std::string &message) | |||
383 | // clear any previous state | 384 | // clear any previous state |
384 | clear(); | 385 | clear(); |
385 | 386 | ||
386 | std::istringstream input(message); | 387 | std::istringstream input(message); |
387 | 388 | ||
388 | S32 parse_result = LLSDSerialize::fromXML(mMessage, input); | 389 | |
389 | 390 | // S32 parse_result = LLSDSerialize::fromXML(test, input); | |
391 | S32 parse_result = LLSDSerialize::fromNotation( mMessage, input, LLSDSerialize::SIZE_UNLIMITED) ; | ||
392 | |||
390 | return (int)parse_result; | 393 | return (int)parse_result; |
391 | } | 394 | } |
392 | 395 | ||
diff --git a/linden/indra/llplugin/llpluginprocesschild.cpp b/linden/indra/llplugin/llpluginprocesschild.cpp index 0d95cac..168236e 100755 --- a/linden/indra/llplugin/llpluginprocesschild.cpp +++ b/linden/indra/llplugin/llpluginprocesschild.cpp | |||
@@ -42,6 +42,14 @@ | |||
42 | #include "llpluginmessagepipe.h" | 42 | #include "llpluginmessagepipe.h" |
43 | #include "llpluginmessageclasses.h" | 43 | #include "llpluginmessageclasses.h" |
44 | 44 | ||
45 | #if LL_WINDOWS | ||
46 | #include <windows.h> | ||
47 | #include <fcntl.h> | ||
48 | #include <io.h> | ||
49 | #include <iostream> | ||
50 | #include <fstream> | ||
51 | #endif | ||
52 | |||
45 | static const F32 HEARTBEAT_SECONDS = 1.0f; | 53 | static const F32 HEARTBEAT_SECONDS = 1.0f; |
46 | static const F32 PLUGIN_IDLE_SECONDS = 1.0f / 100.0f; // Each call to idle will give the plugin this much time. | 54 | static const F32 PLUGIN_IDLE_SECONDS = 1.0f / 100.0f; // Each call to idle will give the plugin this much time. |
47 | 55 | ||
@@ -420,6 +428,12 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message) | |||
420 | { | 428 | { |
421 | mSleepTime = parsed.getValueReal("time"); | 429 | mSleepTime = parsed.getValueReal("time"); |
422 | } | 430 | } |
431 | #if LL_WINDOWS | ||
432 | else if(message_name == "show_console") | ||
433 | { | ||
434 | createConsole(); | ||
435 | } | ||
436 | #endif | ||
423 | else if(message_name == "crash") | 437 | else if(message_name == "crash") |
424 | { | 438 | { |
425 | // Crash the plugin | 439 | // Crash the plugin |
@@ -569,3 +583,46 @@ void LLPluginProcessChild::deliverQueuedMessages() | |||
569 | } | 583 | } |
570 | } | 584 | } |
571 | } | 585 | } |
586 | |||
587 | #if LL_WINDOWS | ||
588 | void LLPluginProcessChild::createConsole() | ||
589 | { | ||
590 | const S32 MAX_CONSOLE_LINES = 500; | ||
591 | |||
592 | int h_con_handle; | ||
593 | long l_std_handle; | ||
594 | |||
595 | CONSOLE_SCREEN_BUFFER_INFO coninfo; | ||
596 | FILE *fp; | ||
597 | |||
598 | // allocate a console for this app | ||
599 | AllocConsole(); | ||
600 | |||
601 | // set the screen buffer to be big enough to let us scroll text | ||
602 | GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo); | ||
603 | coninfo.dwSize.Y = MAX_CONSOLE_LINES; | ||
604 | SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize); | ||
605 | |||
606 | // redirect unbuffered STDOUT to the console | ||
607 | l_std_handle = (long)GetStdHandle(STD_OUTPUT_HANDLE); | ||
608 | h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); | ||
609 | fp = _fdopen( h_con_handle, "w" ); | ||
610 | *stdout = *fp; | ||
611 | setvbuf( stdout, NULL, _IONBF, 0 ); | ||
612 | |||
613 | // redirect unbuffered STDIN to the console | ||
614 | l_std_handle = (long)GetStdHandle(STD_INPUT_HANDLE); | ||
615 | h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); | ||
616 | fp = _fdopen( h_con_handle, "r" ); | ||
617 | *stdin = *fp; | ||
618 | setvbuf( stdin, NULL, _IONBF, 0 ); | ||
619 | |||
620 | // redirect unbuffered STDERR to the console | ||
621 | l_std_handle = (long)GetStdHandle(STD_ERROR_HANDLE); | ||
622 | h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); | ||
623 | fp = _fdopen( h_con_handle, "w" ); | ||
624 | *stderr = *fp; | ||
625 | setvbuf( stderr, NULL, _IOFBF, 1024 ); //Assigning a buffer improves speed a LOT, esp on vista/win7 | ||
626 | //_IOLBF is borked. | ||
627 | } | ||
628 | #endif \ No newline at end of file | ||
diff --git a/linden/indra/llplugin/llpluginprocesschild.h b/linden/indra/llplugin/llpluginprocesschild.h index 5d643d7..6d864bb 100755 --- a/linden/indra/llplugin/llpluginprocesschild.h +++ b/linden/indra/llplugin/llpluginprocesschild.h | |||
@@ -76,7 +76,11 @@ public: | |||
76 | 76 | ||
77 | // Inherited from LLPluginInstanceMessageListener | 77 | // Inherited from LLPluginInstanceMessageListener |
78 | /* virtual */ void receivePluginMessage(const std::string &message); | 78 | /* virtual */ void receivePluginMessage(const std::string &message); |
79 | 79 | ||
80 | #if LL_WINDOWS | ||
81 | void createConsole(); | ||
82 | #endif | ||
83 | |||
80 | private: | 84 | private: |
81 | 85 | ||
82 | enum EState | 86 | enum EState |
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 453bb50..c4f9525 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp | |||
@@ -1344,7 +1344,7 @@ void LLLineEditor::defineMenuCallbacks(LLMenuGL* menu) { | |||
1344 | "Select All Text", | 1344 | "Select All Text", |
1345 | this, | 1345 | this, |
1346 | (void*)context_enable_selectall); | 1346 | (void*)context_enable_selectall); |
1347 | menu->setCtrlResponse(1+LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | 1347 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, |
1348 | "Select All Text", | 1348 | "Select All Text", |
1349 | this, | 1349 | this, |
1350 | (void*)context_selectall); | 1350 | (void*)context_selectall); |
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 5bddcbc..dd72a69 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -636,7 +636,7 @@ void LLTextEditor::defineMenuCallbacks(LLMenuGL* menu) { | |||
636 | "Select All Text", | 636 | "Select All Text", |
637 | this, | 637 | this, |
638 | (void*)context_enable_selectall); | 638 | (void*)context_enable_selectall); |
639 | menu->setCtrlResponse(1+LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | 639 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, |
640 | "Select All Text", | 640 | "Select All Text", |
641 | this, | 641 | this, |
642 | (void*)context_selectall); | 642 | (void*)context_selectall); |
diff --git a/linden/indra/llvfs/lldir.cpp b/linden/indra/llvfs/lldir.cpp index 0c93cbb..43a8f64 100644 --- a/linden/indra/llvfs/lldir.cpp +++ b/linden/indra/llvfs/lldir.cpp | |||
@@ -249,7 +249,7 @@ std::string LLDir::buildSLOSCacheDir() const | |||
249 | } | 249 | } |
250 | else | 250 | else |
251 | { | 251 | { |
252 | res = getOSCacheDir() + mDirDelimiter + "ImprudenceExperimental"; | 252 | res = getOSCacheDir() + mDirDelimiter + "Imprudence"; |
253 | } | 253 | } |
254 | return res; | 254 | return res; |
255 | } | 255 | } |
diff --git a/linden/indra/llvfs/lldir_mac.cpp b/linden/indra/llvfs/lldir_mac.cpp index 6f0b037..5564e30 100644 --- a/linden/indra/llvfs/lldir_mac.cpp +++ b/linden/indra/llvfs/lldir_mac.cpp | |||
@@ -173,7 +173,7 @@ LLDir_Mac::LLDir_Mac() | |||
173 | if (error == noErr) | 173 | if (error == noErr) |
174 | { | 174 | { |
175 | FSRefToLLString(&cacheDirRef, mOSCacheDir); | 175 | FSRefToLLString(&cacheDirRef, mOSCacheDir); |
176 | (void)CFCreateDirectory(&cacheDirRef, CFSTR("ImprudenceExperimental"),NULL); | 176 | (void)CFCreateDirectory(&cacheDirRef, CFSTR("Imprudence"),NULL); |
177 | } | 177 | } |
178 | 178 | ||
179 | // mOSUserAppDir | 179 | // mOSUserAppDir |
diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings index 25e4e6e..1ebe727 100644 --- a/linden/indra/newview/English.lproj/InfoPlist.strings +++ b/linden/indra/newview/English.lproj/InfoPlist.strings | |||
@@ -1,5 +1,5 @@ | |||
1 | /* Localized versions of Info.plist keys */ | 1 | /* Localized versions of Info.plist keys */ |
2 | 2 | ||
3 | CFBundleName = "Imprudence"; | 3 | CFBundleName = "Imprudence"; |
4 | CFBundleShortVersionString = "Imprudence Experimental 2011.04.02"; | 4 | CFBundleShortVersionString = "Imprudence 1.4.0 beta 1"; |
5 | CFBundleGetInfoString = "Imprudence Experimental 2011.04.02"; | 5 | CFBundleGetInfoString = "Imprudence 1.4.0 beta 1"; |
diff --git a/linden/indra/newview/Info-Imprudence.plist b/linden/indra/newview/Info-Imprudence.plist index a4640e7..b3045c9 100644 --- a/linden/indra/newview/Info-Imprudence.plist +++ b/linden/indra/newview/Info-Imprudence.plist | |||
@@ -32,7 +32,7 @@ | |||
32 | </dict> | 32 | </dict> |
33 | </array> | 33 | </array> |
34 | <key>CFBundleVersion</key> | 34 | <key>CFBundleVersion</key> |
35 | <string>Experimental 2011.04.02</string> | 35 | <string>1.4.0 beta 1</string> |
36 | <key>CSResourcesFileMapped</key> | 36 | <key>CSResourcesFileMapped</key> |
37 | <true/> | 37 | <true/> |
38 | </dict> | 38 | </dict> |
diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml index c9e9127..f0db00f 100644 --- a/linden/indra/newview/app_settings/logcontrol.xml +++ b/linden/indra/newview/app_settings/logcontrol.xml | |||
@@ -90,7 +90,12 @@ | |||
90 | <!--<string>TextureCache</string>--> | 90 | <!--<string>TextureCache</string>--> |
91 | <!--<string>Throttle</string>--> | 91 | <!--<string>Throttle</string>--> |
92 | <!--<string>Voice</string>--> | 92 | <!--<string>Voice</string>--> |
93 | <!--<string>"VoiceCaps"</string>--> | ||
94 | <!--<string>VoiceSession</string>--> | ||
95 | <!--<string>VoiceDaemon</string>--> | ||
96 | <!--<string>VoiceDevice</string>--> | ||
93 | <!--<string>VivoxProtocolParser</string>--> | 97 | <!--<string>VivoxProtocolParser</string>--> |
98 | |||
94 | <!--<string>Wearable</string>--> | 99 | <!--<string>Wearable</string>--> |
95 | <!--<string>WindLight</string>--> | 100 | <!--<string>WindLight</string>--> |
96 | 101 | ||
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index e149c41..1ada9f8 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -39,16 +39,27 @@ | |||
39 | <key>Value</key> | 39 | <key>Value</key> |
40 | <integer>0</integer> | 40 | <integer>0</integer> |
41 | </map> | 41 | </map> |
42 | <key>VoiceModule</key> | 42 | <key>VoiceModuleMumble</key> |
43 | <map> | 43 | <map> |
44 | <key>Comment</key> | 44 | <key>Comment</key> |
45 | <string>Executable file that runs voice. Platform specific parts (like .exe on windows) are added automatically.</string> | 45 | <string>Executable file that runs mumble voice . Platform specific parts (like .exe on windows) are added automatically, paths are stripped off if present. Defaults to mumble if empty</string> |
46 | <key>Persist</key> | 46 | <key>Persist</key> |
47 | <integer>1</integer> | 47 | <integer>1</integer> |
48 | <key>Type</key> | 48 | <key>Type</key> |
49 | <string>String</string> | 49 | <string>String</string> |
50 | <key>Value</key> | 50 | <key>Value</key> |
51 | <string>SLVoice</string> | 51 | <string /> |
52 | </map> | ||
53 | <key>VoiceModuleVivox</key> | ||
54 | <map> | ||
55 | <key>Comment</key> | ||
56 | <string>Executable file that runs vivox voice. Platform specific parts (like .exe on windows) are added automatically, paths are stripped off if present. Defaults to SLVoice if empty.</string> | ||
57 | <key>Persist</key> | ||
58 | <integer>1</integer> | ||
59 | <key>Type</key> | ||
60 | <string>String</string> | ||
61 | <key>Value</key> | ||
62 | <string /> | ||
52 | </map> | 63 | </map> |
53 | 64 | ||
54 | <!-- end Aurora-specific settings --> | 65 | <!-- end Aurora-specific settings --> |
@@ -204,7 +215,7 @@ | |||
204 | <key>AutoCloseOOC</key> | 215 | <key>AutoCloseOOC</key> |
205 | <map> | 216 | <map> |
206 | <key>Comment</key> | 217 | <key>Comment</key> |
207 | <string>Auto-close OOC chat (i.e. add \"))\" if not found and \"((\" was used)</string> | 218 | <string>Auto-close OOC chat (i.e. add '"))'" if not found and '"(('" was used)</string> |
208 | <key>Persist</key> | 219 | <key>Persist</key> |
209 | <integer>1</integer> | 220 | <integer>1</integer> |
210 | <key>Type</key> | 221 | <key>Type</key> |
@@ -459,7 +470,7 @@ | |||
459 | <key>OmitResidentAsLastName</key> | 470 | <key>OmitResidentAsLastName</key> |
460 | <map> | 471 | <map> |
461 | <key>Comment</key> | 472 | <key>Comment</key> |
462 | <string>Do not display "Resident" as the last name for new residents in their legacy name</string> | 473 | <string>Do not display "Resident" as the last name for new residents in their legacy name</string> |
463 | <key>Persist</key> | 474 | <key>Persist</key> |
464 | <integer>1</integer> | 475 | <integer>1</integer> |
465 | <key>Type</key> | 476 | <key>Type</key> |
@@ -639,7 +650,7 @@ | |||
639 | <key>GoAction</key> | 650 | <key>GoAction</key> |
640 | <map> | 651 | <map> |
641 | <key>Comment</key> | 652 | <key>Comment</key> |
642 | <string>How to move for "Go Here" or double-click move. Either "Autopilot" or "Teleport".</string> | 653 | <string>How to move for "Go Here" or double-click move. Either "Autopilot" or "Teleport".</string> |
643 | <key>Persist</key> | 654 | <key>Persist</key> |
644 | <integer>1</integer> | 655 | <integer>1</integer> |
645 | <key>Type</key> | 656 | <key>Type</key> |
@@ -2216,7 +2227,7 @@ | |||
2216 | <key>RLVaEnableWear</key> | 2227 | <key>RLVaEnableWear</key> |
2217 | <map> | 2228 | <map> |
2218 | <key>Comment</key> | 2229 | <key>Comment</key> |
2219 | <string>Enables the "Wear" option on the inventory item context menu for attachments</string> | 2230 | <string>Enables the "Wear" option on the inventory item context menu for attachments</string> |
2220 | <key>Persist</key> | 2231 | <key>Persist</key> |
2221 | <integer>1</integer> | 2232 | <integer>1</integer> |
2222 | <key>Type</key> | 2233 | <key>Type</key> |
@@ -2238,7 +2249,7 @@ | |||
2238 | <key>RLVaHideLockedLayers</key> | 2249 | <key>RLVaHideLockedLayers</key> |
2239 | <map> | 2250 | <map> |
2240 | <key>Comment</key> | 2251 | <key>Comment</key> |
2241 | <string>Hides "remove outfit" restricted worn clothing layers from @getoufit</string> | 2252 | <string>Hides "remove outfit" restricted worn clothing layers from @getoufit</string> |
2242 | <key>Persist</key> | 2253 | <key>Persist</key> |
2243 | <integer>1</integer> | 2254 | <integer>1</integer> |
2244 | <key>Type</key> | 2255 | <key>Type</key> |
@@ -2271,7 +2282,7 @@ | |||
2271 | <key>RLVaShowNameTags</key> | 2282 | <key>RLVaShowNameTags</key> |
2272 | <map> | 2283 | <map> |
2273 | <key>Comment</key> | 2284 | <key>Comment</key> |
2274 | <string>Display of names above avatars is subject to the general "Show Names" setting when @shownames=n restricted</string> | 2285 | <string>Display of names above avatars is subject to the general "Show Names" setting when @shownames=n restricted</string> |
2275 | <key>Persist</key> | 2286 | <key>Persist</key> |
2276 | <integer>1</integer> | 2287 | <integer>1</integer> |
2277 | <key>Type</key> | 2288 | <key>Type</key> |
@@ -2996,7 +3007,7 @@ | |||
2996 | <key>AutomaticFly</key> | 3007 | <key>AutomaticFly</key> |
2997 | <map> | 3008 | <map> |
2998 | <key>Comment</key> | 3009 | <key>Comment</key> |
2999 | <string>Fly by holding jump key or using "Fly" command (FALSE = fly by using "Fly" command only)</string> | 3010 | <string>Fly by holding jump key or using "Fly" command (FALSE = fly by using "Fly" command only)</string> |
3000 | <key>Persist</key> | 3011 | <key>Persist</key> |
3001 | <integer>1</integer> | 3012 | <integer>1</integer> |
3002 | <key>Type</key> | 3013 | <key>Type</key> |
@@ -5626,7 +5637,7 @@ | |||
5626 | <key>DoubleClickAction</key> | 5637 | <key>DoubleClickAction</key> |
5627 | <map> | 5638 | <map> |
5628 | <key>Comment</key> | 5639 | <key>Comment</key> |
5629 | <string>What to do when you double-click. Either "None" or "Go".</string> | 5640 | <string>What to do when you double-click. Either "None" or "Go".</string> |
5630 | <key>Persist</key> | 5641 | <key>Persist</key> |
5631 | <integer>1</integer> | 5642 | <integer>1</integer> |
5632 | <key>Type</key> | 5643 | <key>Type</key> |
@@ -5862,7 +5873,7 @@ | |||
5862 | <key>FindLandType</key> | 5873 | <key>FindLandType</key> |
5863 | <map> | 5874 | <map> |
5864 | <key>Comment</key> | 5875 | <key>Comment</key> |
5865 | <string>Controls which type of land you are searching for in Find Land interface ("All", "Auction", "For Sale")</string> | 5876 | <string>Controls which type of land you are searching for in Find Land interface ("All", "Auction", "For Sale")</string> |
5866 | <key>Persist</key> | 5877 | <key>Persist</key> |
5867 | <integer>1</integer> | 5878 | <integer>1</integer> |
5868 | <key>Type</key> | 5879 | <key>Type</key> |
@@ -7784,7 +7795,7 @@ | |||
7784 | <key>LastFindPanel</key> | 7795 | <key>LastFindPanel</key> |
7785 | <map> | 7796 | <map> |
7786 | <key>Comment</key> | 7797 | <key>Comment</key> |
7787 | <string>Controls which find operation appears by default when clicking "Find" button </string> | 7798 | <string>Controls which find operation appears by default when clicking "Find" button </string> |
7788 | <key>Persist</key> | 7799 | <key>Persist</key> |
7789 | <integer>1</integer> | 7800 | <integer>1</integer> |
7790 | <key>Type</key> | 7801 | <key>Type</key> |
@@ -8306,7 +8317,7 @@ | |||
8306 | <key>MediaOnAPrimUI</key> | 8317 | <key>MediaOnAPrimUI</key> |
8307 | <map> | 8318 | <map> |
8308 | <key>Comment</key> | 8319 | <key>Comment</key> |
8309 | <string>Whether or not to show the "link sharing" UI</string> | 8320 | <string>Whether or not to show the "link sharing" UI</string> |
8310 | <key>Persist</key> | 8321 | <key>Persist</key> |
8311 | <integer>1</integer> | 8322 | <integer>1</integer> |
8312 | <key>Type</key> | 8323 | <key>Type</key> |
@@ -8903,7 +8914,7 @@ | |||
8903 | <key>OverlayTitle</key> | 8914 | <key>OverlayTitle</key> |
8904 | <map> | 8915 | <map> |
8905 | <key>Comment</key> | 8916 | <key>Comment</key> |
8906 | <string>Controls watermark text message displayed on screen when "ShowOverlayTitle" is enabled (one word, underscores become spaces)</string> | 8917 | <string>Controls watermark text message displayed on screen when "ShowOverlayTitle" is enabled (one word, underscores become spaces)</string> |
8907 | <key>Persist</key> | 8918 | <key>Persist</key> |
8908 | <integer>1</integer> | 8919 | <integer>1</integer> |
8909 | <key>Type</key> | 8920 | <key>Type</key> |
@@ -13246,7 +13257,7 @@ | |||
13246 | <key>UISndHealthReductionThreshold</key> | 13257 | <key>UISndHealthReductionThreshold</key> |
13247 | <map> | 13258 | <map> |
13248 | <key>Comment</key> | 13259 | <key>Comment</key> |
13249 | <string>Amount of health reduction required to trigger "pain" sound</string> | 13260 | <string>Amount of health reduction required to trigger "pain" sound</string> |
13250 | <key>Persist</key> | 13261 | <key>Persist</key> |
13251 | <integer>1</integer> | 13262 | <integer>1</integer> |
13252 | <key>Type</key> | 13263 | <key>Type</key> |
@@ -13279,7 +13290,7 @@ | |||
13279 | <key>UISndMoneyChangeThreshold</key> | 13290 | <key>UISndMoneyChangeThreshold</key> |
13280 | <map> | 13291 | <map> |
13281 | <key>Comment</key> | 13292 | <key>Comment</key> |
13282 | <string>Amount of change in L$ balance required to trigger "money" sound</string> | 13293 | <string>Amount of change in L$ balance required to trigger "money" sound</string> |
13283 | <key>Persist</key> | 13294 | <key>Persist</key> |
13284 | <integer>1</integer> | 13295 | <integer>1</integer> |
13285 | <key>Type</key> | 13296 | <key>Type</key> |
@@ -13576,7 +13587,7 @@ | |||
13576 | <key>UseDebugMenus</key> | 13587 | <key>UseDebugMenus</key> |
13577 | <map> | 13588 | <map> |
13578 | <key>Comment</key> | 13589 | <key>Comment</key> |
13579 | <string>Turns on "Debug" menu</string> | 13590 | <string>Turns on "Debug" menu</string> |
13580 | <key>Persist</key> | 13591 | <key>Persist</key> |
13581 | <integer>1</integer> | 13592 | <integer>1</integer> |
13582 | <key>Type</key> | 13593 | <key>Type</key> |
diff --git a/linden/indra/newview/app_settings/viewerversion.xml b/linden/indra/newview/app_settings/viewerversion.xml index 051f2a3..33d810e 100644 --- a/linden/indra/newview/app_settings/viewerversion.xml +++ b/linden/indra/newview/app_settings/viewerversion.xml | |||
@@ -20,6 +20,6 @@ need to be changed manually - MC | |||
20 | <viewer version_patch="0" /> | 20 | <viewer version_patch="0" /> |
21 | 21 | ||
22 | <!--string--> | 22 | <!--string--> |
23 | <viewer version_test="Experimental 2011.04.19" /> | 23 | <viewer version_test="beta 1" /> |
24 | 24 | ||
25 | </viewer_version> | 25 | </viewer_version> |
diff --git a/linden/indra/newview/hippogridmanager.cpp b/linden/indra/newview/hippogridmanager.cpp index 78539f8..4c46d3e 100644 --- a/linden/indra/newview/hippogridmanager.cpp +++ b/linden/indra/newview/hippogridmanager.cpp | |||
@@ -89,7 +89,7 @@ HippoGridInfo::HippoGridInfo(const std::string& gridNick) : | |||
89 | mPasswordAvatar(LLStringUtil::null), | 89 | mPasswordAvatar(LLStringUtil::null), |
90 | mXmlState(XML_VOID), | 90 | mXmlState(XML_VOID), |
91 | mVoiceConnector("SLVoice"), | 91 | mVoiceConnector("SLVoice"), |
92 | mRenderCompat(true), | 92 | mRenderCompat(false), |
93 | mMaxAgentGroups(-1), | 93 | mMaxAgentGroups(-1), |
94 | mCurrencySymbol("OS$"), | 94 | mCurrencySymbol("OS$"), |
95 | mRealCurrencySymbol("US$"), | 95 | mRealCurrencySymbol("US$"), |
diff --git a/linden/indra/newview/kowopenregionsettings.cpp b/linden/indra/newview/kowopenregionsettings.cpp index 0c4bb38..6257147 100644 --- a/linden/indra/newview/kowopenregionsettings.cpp +++ b/linden/indra/newview/kowopenregionsettings.cpp | |||
@@ -36,7 +36,6 @@ | |||
36 | #include "llviewerobject.h" | 36 | #include "llviewerobject.h" |
37 | #include "llfloaterregioninfo.h" | 37 | #include "llfloaterregioninfo.h" |
38 | #include "llfloaterworldmap.h" | 38 | #include "llfloaterworldmap.h" |
39 | #include "llvoiceclient.h" | ||
40 | #include "viewertime.h" | 39 | #include "viewertime.h" |
41 | 40 | ||
42 | //DEBUG includes | 41 | //DEBUG includes |
@@ -205,12 +204,7 @@ class OpenRegionInfoUpdate : public LLHTTPNode | |||
205 | { | 204 | { |
206 | gHippoLimits->mAllowParcelWindLight = body["AllowParcelWindLight"].asInteger() == 1; | 205 | gHippoLimits->mAllowParcelWindLight = body["AllowParcelWindLight"].asInteger() == 1; |
207 | } | 206 | } |
208 | if ( body.has("Voice") ) | 207 | |
209 | { | ||
210 | gSavedSettings.setString("VoiceModule", body["Voice"].asString()); | ||
211 | //gVoiceClient->close(); | ||
212 | //gVoiceClient->start(); | ||
213 | } | ||
214 | 208 | ||
215 | if (limitschanged) | 209 | if (limitschanged) |
216 | gFloaterTools->updateToolsSizeLimits(); | 210 | gFloaterTools->updateToolsSizeLimits(); |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 1d62a1a..aa3de97 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -1844,7 +1844,7 @@ bool LLAppViewer::initConfiguration() | |||
1844 | // - set procedural settings | 1844 | // - set procedural settings |
1845 | gSavedSettings.setString("ClientSettingsFile", | 1845 | gSavedSettings.setString("ClientSettingsFile", |
1846 | // gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); | 1846 | // gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); |
1847 | gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence_experimental.xml")); | 1847 | gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence.xml")); |
1848 | 1848 | ||
1849 | gSavedSettings.setString("VersionChannelName", ViewerVersion::getImpViewerName()); | 1849 | gSavedSettings.setString("VersionChannelName", ViewerVersion::getImpViewerName()); |
1850 | 1850 | ||
diff --git a/linden/indra/newview/llface.cpp b/linden/indra/newview/llface.cpp index aa8cd15..cf681fa 100644 --- a/linden/indra/newview/llface.cpp +++ b/linden/indra/newview/llface.cpp | |||
@@ -159,6 +159,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) | |||
159 | mIndicesIndex = 0; | 159 | mIndicesIndex = 0; |
160 | mTexture = NULL; | 160 | mTexture = NULL; |
161 | mTEOffset = -1; | 161 | mTEOffset = -1; |
162 | mIndexInTex = 0; | ||
162 | 163 | ||
163 | setDrawable(drawablep); | 164 | setDrawable(drawablep); |
164 | mVObjp = objp; | 165 | mVObjp = objp; |
diff --git a/linden/indra/newview/llface.h b/linden/indra/newview/llface.h index e31b93f..f870370 100644 --- a/linden/indra/newview/llface.h +++ b/linden/indra/newview/llface.h | |||
@@ -228,7 +228,7 @@ private: | |||
228 | U16 mGeomIndex; // index into draw pool | 228 | U16 mGeomIndex; // index into draw pool |
229 | U32 mIndicesCount; | 229 | U32 mIndicesCount; |
230 | U32 mIndicesIndex; // index into draw pool for indices (yeah, I know!) | 230 | U32 mIndicesIndex; // index into draw pool for indices (yeah, I know!) |
231 | S32 mIndexInTex ; | 231 | S32 mIndexInTex ; // index of this face in the texture's face list |
232 | 232 | ||
233 | //previous rebuild's geometry info | 233 | //previous rebuild's geometry info |
234 | U16 mLastGeomCount; | 234 | U16 mLastGeomCount; |
diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index f482d1c..c6f8356 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp | |||
@@ -417,4 +417,4 @@ void LLFirstUse::Privacy() | |||
417 | { | 417 | { |
418 | LLStartUp::setStartupState(STATE_PRIVACY_LECTURED); | 418 | LLStartUp::setStartupState(STATE_PRIVACY_LECTURED); |
419 | } | 419 | } |
420 | } \ No newline at end of file | 420 | } |
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index fd9d077..e83a466 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -1398,7 +1398,7 @@ bool LLPanelLogin::loadNewsBar() | |||
1398 | curl_free(curl_version); | 1398 | curl_free(curl_version); |
1399 | curl_free(curl_skin); | 1399 | curl_free(curl_skin); |
1400 | 1400 | ||
1401 | LL_DEBUGS("NewsBar")<< "news bar setup to navigate to: " << full_url.str() << LL_ENDL; | 1401 | LL_DEBUGS("NewsBar")<< "news bar setup to navigate to: " << full_url.str() << LL_ENDL; |
1402 | news_bar->navigateTo( full_url.str() ); | 1402 | news_bar->navigateTo( full_url.str() ); |
1403 | 1403 | ||
1404 | 1404 | ||
diff --git a/linden/indra/newview/llprefsvoice.cpp b/linden/indra/newview/llprefsvoice.cpp index 8abe178..0e8e816 100644 --- a/linden/indra/newview/llprefsvoice.cpp +++ b/linden/indra/newview/llprefsvoice.cpp | |||
@@ -153,8 +153,8 @@ void LLPrefsVoice::apply() | |||
153 | if (enable_voice && !gSavedSettings.getBOOL("VivoxLicenseAccepted")) | 153 | if (enable_voice && !gSavedSettings.getBOOL("VivoxLicenseAccepted")) |
154 | { | 154 | { |
155 | // This window enables voice chat if license is accepted | 155 | // This window enables voice chat if license is accepted |
156 | FloaterVoiceLicense::getInstance()->open(); | 156 | FloaterVoiceLicense::getInstance()->open(); |
157 | FloaterVoiceLicense::getInstance()->center(); | 157 | FloaterVoiceLicense::getInstance()->center(); |
158 | } | 158 | } |
159 | else | 159 | else |
160 | { | 160 | { |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index e29dc5a..b80a286 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -1884,8 +1884,7 @@ bool idle_startup() | |||
1884 | tmp = LLUserAuth::getInstance()->getResponse("max-agent-groups"); | 1884 | tmp = LLUserAuth::getInstance()->getResponse("max-agent-groups"); |
1885 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setMaxAgentGroups(atoi(tmp.c_str())); | 1885 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setMaxAgentGroups(atoi(tmp.c_str())); |
1886 | 1886 | ||
1887 | tmp = LLUserAuth::getInstance()->getResponse("VoiceConnector"); | 1887 | |
1888 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setVoiceConnector(tmp); | ||
1889 | gHippoGridManager->saveFile(); | 1888 | gHippoGridManager->saveFile(); |
1890 | gHippoLimits->setLimits(); | 1889 | gHippoLimits->setLimits(); |
1891 | 1890 | ||
@@ -1931,8 +1930,7 @@ bool idle_startup() | |||
1931 | } | 1930 | } |
1932 | // else llwarns << "MapServerURL empty"<< llendl; | 1931 | // else llwarns << "MapServerURL empty"<< llendl; |
1933 | 1932 | ||
1934 | // Pass the user information to the voice chat server interface. | 1933 | |
1935 | gVoiceClient->userAuthorized(firstname, lastname, gAgentID); | ||
1936 | } | 1934 | } |
1937 | else // if(successful_login) | 1935 | else // if(successful_login) |
1938 | { | 1936 | { |
@@ -2065,6 +2063,7 @@ bool idle_startup() | |||
2065 | LL_DEBUGS("AppInitStartupState") << "STATE_SEED_CAP_GRANTED" << LL_ENDL; | 2063 | LL_DEBUGS("AppInitStartupState") << "STATE_SEED_CAP_GRANTED" << LL_ENDL; |
2066 | update_texture_fetch(); | 2064 | update_texture_fetch(); |
2067 | 2065 | ||
2066 | |||
2068 | if ( gViewerWindow != NULL) | 2067 | if ( gViewerWindow != NULL) |
2069 | { // This isn't the first logon attempt, so show the UI | 2068 | { // This isn't the first logon attempt, so show the UI |
2070 | gViewerWindow->setNormalControlsVisible( TRUE ); | 2069 | gViewerWindow->setNormalControlsVisible( TRUE ); |
@@ -2123,6 +2122,9 @@ bool idle_startup() | |||
2123 | // | 2122 | // |
2124 | LL_INFOS("AppInit") << "Initializing communications..." << LL_ENDL; | 2123 | LL_INFOS("AppInit") << "Initializing communications..." << LL_ENDL; |
2125 | 2124 | ||
2125 | // Pass the user information to the voice chat server interface. | ||
2126 | gVoiceClient->userAuthorized(firstname, lastname, gAgentID); | ||
2127 | |||
2126 | // register callbacks for messages. . . do this after initial handshake to make sure that we don't catch any unwanted | 2128 | // register callbacks for messages. . . do this after initial handshake to make sure that we don't catch any unwanted |
2127 | register_viewer_callbacks(gMessageSystem); | 2129 | register_viewer_callbacks(gMessageSystem); |
2128 | 2130 | ||
@@ -2142,7 +2144,7 @@ bool idle_startup() | |||
2142 | gCacheName->addObserver(callback_cache_name); | 2144 | gCacheName->addObserver(callback_cache_name); |
2143 | 2145 | ||
2144 | // Load stored cache if possible | 2146 | // Load stored cache if possible |
2145 | LLAppViewer::instance()->loadNameCache(); | 2147 | LLAppViewer::instance()->loadNameCache(); |
2146 | 2148 | ||
2147 | // Start cache in not-running state until we figure out if we have | 2149 | // Start cache in not-running state until we figure out if we have |
2148 | // capabilities for display name lookup | 2150 | // capabilities for display name lookup |
diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index 3703f5e..22d9959 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp | |||
@@ -1205,6 +1205,7 @@ void LLTextureCache::readHeaderCache() | |||
1205 | { | 1205 | { |
1206 | purge_list.insert(iter->second); | 1206 | purge_list.insert(iter->second); |
1207 | } | 1207 | } |
1208 | llassert_always(purge_list.size() >= entries_to_purge); | ||
1208 | } | 1209 | } |
1209 | else | 1210 | else |
1210 | { | 1211 | { |
diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index ab867a6..bdad2b8 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp | |||
@@ -874,15 +874,6 @@ bool LLTextureFetchWorker::doWork(S32 param) | |||
874 | } | 874 | } |
875 | } | 875 | } |
876 | 876 | ||
877 | // *TODO: remove this hack when not needed anymore | ||
878 | S32 buggy_range_fudge = 0; | ||
879 | if (LLTextureFetch::hasBuggyHTTPRange()) | ||
880 | { | ||
881 | buggy_range_fudge = 1; | ||
882 | resetFormattedData(); // discard any previous data we had | ||
883 | cur_size = 0 ; | ||
884 | } | ||
885 | |||
886 | mRequestedSize = mDesiredSize; | 877 | mRequestedSize = mDesiredSize; |
887 | mRequestedDiscard = mDesiredDiscard; | 878 | mRequestedDiscard = mDesiredDiscard; |
888 | mRequestedSize -= cur_size; | 879 | mRequestedSize -= cur_size; |
@@ -898,7 +889,7 @@ bool LLTextureFetchWorker::doWork(S32 param) | |||
898 | mGetReason.clear(); | 889 | mGetReason.clear(); |
899 | LL_DEBUGS("TextureFetch") << "HTTP GET: " << mID << " Offset: " << offset | 890 | LL_DEBUGS("TextureFetch") << "HTTP GET: " << mID << " Offset: " << offset |
900 | << " Bytes: " << mRequestedSize | 891 | << " Bytes: " << mRequestedSize |
901 | << " Range: " << offset << "-" << offset+mRequestedSize-1+buggy_range_fudge | 892 | << " Range: " << offset << "-" << offset+mRequestedSize-1 |
902 | << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth | 893 | << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth |
903 | << LL_ENDL; | 894 | << LL_ENDL; |
904 | setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); | 895 | setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); |
@@ -908,7 +899,7 @@ bool LLTextureFetchWorker::doWork(S32 param) | |||
908 | // Will call callbackHttpGet when curl request completes | 899 | // Will call callbackHttpGet when curl request completes |
909 | std::vector<std::string> headers; | 900 | std::vector<std::string> headers; |
910 | headers.push_back("Accept: image/x-j2c"); | 901 | headers.push_back("Accept: image/x-j2c"); |
911 | res = mFetcher->mCurlGetRequest->getByteRange(mUrl, headers, offset, mRequestedSize + buggy_range_fudge, | 902 | res = mFetcher->mCurlGetRequest->getByteRange(mUrl, headers, offset, mRequestedSize, |
912 | new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset)); | 903 | new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, offset)); |
913 | } | 904 | } |
914 | if (!res) | 905 | if (!res) |
@@ -2279,45 +2270,3 @@ void LLTextureFetch::dump() | |||
2279 | << llendl; | 2270 | << llendl; |
2280 | } | 2271 | } |
2281 | } | 2272 | } |
2282 | |||
2283 | // This tries to detect if the sim has this bug: | ||
2284 | // http://opensimulator.org/mantis/view.php?id=5081 | ||
2285 | // | ||
2286 | // *TODO: This is a *HACK and may not work if the grid is heterogenous. | ||
2287 | // Remove it once OpenSim versions in the wild are > 0.7.0.2! | ||
2288 | #include "hippogridmanager.h" | ||
2289 | #include <boost/regex.hpp> | ||
2290 | //static | ||
2291 | bool LLTextureFetch::hasBuggyHTTPRange() | ||
2292 | { | ||
2293 | static std::string s_version; | ||
2294 | static bool buggy = false; | ||
2295 | if ((s_version != gLastVersionChannel) && !gLastVersionChannel.empty()) | ||
2296 | { | ||
2297 | s_version = gLastVersionChannel; | ||
2298 | buggy = false; | ||
2299 | if (gHippoGridManager->getConnectedGrid()->getPlatform() == HippoGridInfo::PLATFORM_OPENSIM) | ||
2300 | { | ||
2301 | std::string ver_string; | ||
2302 | try | ||
2303 | { | ||
2304 | const boost::regex re(".*OpenSim.*?([0-9.]+).+"); | ||
2305 | ver_string = regex_replace(s_version, re, "\\1", boost::match_default); | ||
2306 | } | ||
2307 | catch(std::runtime_error) | ||
2308 | { | ||
2309 | ver_string = "0.0"; | ||
2310 | } | ||
2311 | LLStringUtil::replaceChar(ver_string, '.', '0'); | ||
2312 | ver_string = "0." + ver_string; | ||
2313 | F64 version = atof(ver_string.c_str()); | ||
2314 | // we look for "0.6.8" < version < "0.7.0.3" | ||
2315 | if ((version > 0.00608) && (version < 0.0070003)) | ||
2316 | { | ||
2317 | buggy = true; | ||
2318 | llwarns << "Setting buggy http ranges mode for current sim, because we're on " << s_version << llendl; | ||
2319 | } | ||
2320 | } | ||
2321 | } | ||
2322 | return buggy; | ||
2323 | } | ||
diff --git a/linden/indra/newview/lltexturefetch.h b/linden/indra/newview/lltexturefetch.h index 5fa2d1c..6c6bb52 100644 --- a/linden/indra/newview/lltexturefetch.h +++ b/linden/indra/newview/lltexturefetch.h | |||
@@ -86,8 +86,6 @@ public: | |||
86 | 86 | ||
87 | LLTextureInfo* getTextureInfo() { return &mTextureInfo; } | 87 | LLTextureInfo* getTextureInfo() { return &mTextureInfo; } |
88 | 88 | ||
89 | static bool hasBuggyHTTPRange(); // *TODO: remove this *HACK once buggy OpenSim versions are gone | ||
90 | |||
91 | protected: | 89 | protected: |
92 | void addToNetworkQueue(LLTextureFetchWorker* worker); | 90 | void addToNetworkQueue(LLTextureFetchWorker* worker); |
93 | void removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel); | 91 | void removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel); |
diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp index 039896f..de92903 100644 --- a/linden/indra/newview/llviewerimagelist.cpp +++ b/linden/indra/newview/llviewerimagelist.cpp | |||
@@ -193,6 +193,13 @@ void LLViewerImageList::doPreloadImages() | |||
193 | mImagePreloads.insert(image); | 193 | mImagePreloads.insert(image); |
194 | } | 194 | } |
195 | 195 | ||
196 | // Preload default unrezzad avatar cloud | ||
197 | image = getImageFromFile("cloud-particle.j2c",MIPMAP_YES,IMMEDIATE_YES,0,0,DEFAULT_UNREZZED_AVATAR_PARTICLE); | ||
198 | if (image) | ||
199 | { | ||
200 | image->setAddressMode(LLTexUnit::TAM_WRAP); | ||
201 | mImagePreloads.insert(image); | ||
202 | } | ||
196 | } | 203 | } |
197 | 204 | ||
198 | static std::string get_texture_list_name() | 205 | static std::string get_texture_list_name() |
diff --git a/linden/indra/newview/llviewermedia.cpp b/linden/indra/newview/llviewermedia.cpp index c228468..84fd0ba 100644 --- a/linden/indra/newview/llviewermedia.cpp +++ b/linden/indra/newview/llviewermedia.cpp | |||
@@ -547,6 +547,13 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ | |||
547 | 547 | ||
548 | if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))) | 548 | if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))) |
549 | { | 549 | { |
550 | #if LL_WINDOWS | ||
551 | if (gSavedSettings.getBOOL("ShowConsoleWindow")) | ||
552 | { | ||
553 | media_source->showConsole(); | ||
554 | } | ||
555 | #endif | ||
556 | |||
550 | return media_source; | 557 | return media_source; |
551 | } | 558 | } |
552 | else | 559 | else |
diff --git a/linden/indra/newview/llviewermedia_streamingaudio.cpp b/linden/indra/newview/llviewermedia_streamingaudio.cpp index 6a4dd0f..f02870b 100644 --- a/linden/indra/newview/llviewermedia_streamingaudio.cpp +++ b/linden/indra/newview/llviewermedia_streamingaudio.cpp | |||
@@ -96,7 +96,7 @@ void LLStreamingAudio_MediaPlugins::stop() | |||
96 | { | 96 | { |
97 | mMediaPlugin->stop(); | 97 | mMediaPlugin->stop(); |
98 | } | 98 | } |
99 | 99 | llinfos << "Stopping internet stream." << llendl; | |
100 | mURL.clear(); | 100 | mURL.clear(); |
101 | } | 101 | } |
102 | 102 | ||
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 719aa6e..b044309 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -1525,7 +1525,7 @@ void LLVOAvatar::loadCloud(const std::string& filename, LLPartSysData& particle | |||
1525 | if(particles.mPartImageID.isNull() || default_id == particles.mPartImageID) | 1525 | if(particles.mPartImageID.isNull() || default_id == particles.mPartImageID) |
1526 | { | 1526 | { |
1527 | LLViewerImage* cloud_image = | 1527 | LLViewerImage* cloud_image = |
1528 | gImageList.getImageFromFile("cloud-particle.j2c", MIPMAP_YES, IMMEDIATE_YES, 0, 0, default_id); | 1528 | gImageList.getImage(default_id); |
1529 | particles.mPartImageID = cloud_image->getID(); | 1529 | particles.mPartImageID = cloud_image->getID(); |
1530 | } | 1530 | } |
1531 | } | 1531 | } |
@@ -7600,7 +7600,8 @@ LLGLuint LLVOAvatar::getScratchTexName( LLGLenum format, U32* texture_bytes ) | |||
7600 | { | 7600 | { |
7601 | case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; | 7601 | case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; |
7602 | case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; | 7602 | case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; |
7603 | case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; | 7603 | // Deprecated. See http://svn.secondlife.com/trac/linden/changeset/2757 |
7604 | // case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; | ||
7604 | case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; | 7605 | case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; |
7605 | case GL_RGB: components = 3; internal_format = GL_RGB8; break; | 7606 | case GL_RGB: components = 3; internal_format = GL_RGB8; break; |
7606 | case GL_RGBA: components = 4; internal_format = GL_RGBA8; break; | 7607 | case GL_RGBA: components = 4; internal_format = GL_RGBA8; break; |
@@ -8753,7 +8754,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) | |||
8753 | 8754 | ||
8754 | if( !param ) | 8755 | if( !param ) |
8755 | { | 8756 | { |
8756 | llwarns << "Number of params in AvatarAppearance msg does not match number of params in avatar xml file." << llendl; | ||
8757 | break; | 8757 | break; |
8758 | } | 8758 | } |
8759 | 8759 | ||
@@ -8795,10 +8795,9 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) | |||
8795 | } | 8795 | } |
8796 | } | 8796 | } |
8797 | 8797 | ||
8798 | S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT | 8798 | while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) ) |
8799 | if (num_blocks != expected_tweakable_count) | ||
8800 | { | 8799 | { |
8801 | llinfos << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. Object: " << getID() << llendl; | 8800 | param = getNextVisualParam(); |
8802 | } | 8801 | } |
8803 | 8802 | ||
8804 | if (params_changed) | 8803 | if (params_changed) |
diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 2266aab..115f6e8 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp | |||
@@ -139,22 +139,23 @@ class LLViewerVoiceAccountProvisionResponder : | |||
139 | public LLHTTPClient::Responder | 139 | public LLHTTPClient::Responder |
140 | { | 140 | { |
141 | public: | 141 | public: |
142 | LLViewerVoiceAccountProvisionResponder(int retries) | 142 | LLViewerVoiceAccountProvisionResponder(int retries, LLUUID response_id) |
143 | { | 143 | { |
144 | mRetries = retries; | 144 | mRetries = retries; |
145 | mResponseID = response_id; | ||
145 | } | 146 | } |
146 | 147 | ||
147 | virtual void error(U32 status, const std::string& reason) | 148 | virtual void error(U32 status, const std::string& reason) |
148 | { | 149 | { |
149 | if ( mRetries > 0 ) | 150 | if ( mRetries > 0 ) |
150 | { | 151 | { |
151 | LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, retrying. status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; | 152 | LL_DEBUGS("VoiceCaps") << "ProvisionVoiceAccountRequest returned an error, retrying. status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; |
152 | if ( gVoiceClient ) gVoiceClient->requestVoiceAccountProvision( | 153 | if ( gVoiceClient ) gVoiceClient->requestVoiceAccountProvision( |
153 | mRetries - 1); | 154 | mRetries - 1); |
154 | } | 155 | } |
155 | else | 156 | else |
156 | { | 157 | { |
157 | LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, too many retries (giving up). status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; | 158 | LL_DEBUGS("VoiceCaps") << "ProvisionVoiceAccountRequest returned an error, too many retries (giving up). status = " << status << ", reason = \"" << reason << "\"" << LL_ENDL; |
158 | if ( gVoiceClient ) gVoiceClient->giveUp(); | 159 | if ( gVoiceClient ) gVoiceClient->giveUp(); |
159 | } | 160 | } |
160 | } | 161 | } |
@@ -166,7 +167,7 @@ public: | |||
166 | std::string voice_sip_uri_hostname; | 167 | std::string voice_sip_uri_hostname; |
167 | std::string voice_account_server_uri; | 168 | std::string voice_account_server_uri; |
168 | 169 | ||
169 | LL_DEBUGS("Voice") << "ProvisionVoiceAccountRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; | 170 | LL_DEBUGS("VoiceCaps") << "ProvisionVoiceAccountRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; |
170 | 171 | ||
171 | if(content.has("voice_sip_uri_hostname")) | 172 | if(content.has("voice_sip_uri_hostname")) |
172 | voice_sip_uri_hostname = content["voice_sip_uri_hostname"].asString(); | 173 | voice_sip_uri_hostname = content["voice_sip_uri_hostname"].asString(); |
@@ -179,12 +180,14 @@ public: | |||
179 | content["username"].asString(), | 180 | content["username"].asString(), |
180 | content["password"].asString(), | 181 | content["password"].asString(), |
181 | voice_sip_uri_hostname, | 182 | voice_sip_uri_hostname, |
182 | voice_account_server_uri); | 183 | voice_account_server_uri, |
184 | mResponseID); | ||
183 | } | 185 | } |
184 | } | 186 | } |
185 | 187 | ||
186 | private: | 188 | private: |
187 | int mRetries; | 189 | int mRetries; |
190 | LLUUID mResponseID; | ||
188 | }; | 191 | }; |
189 | 192 | ||
190 | /** | 193 | /** |
@@ -364,7 +367,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl( | |||
364 | // If this message isn't set to be squelched, output the raw XML received. | 367 | // If this message isn't set to be squelched, output the raw XML received. |
365 | if(!squelchDebugOutput) | 368 | if(!squelchDebugOutput) |
366 | { | 369 | { |
367 | LL_DEBUGS("Voice") << "parsing: " << mInput.substr(start, delim - start) << LL_ENDL; | 370 | LL_DEBUGS("VivoxProtocolParser") << "parsing: " << mInput.substr(start, delim - start) << LL_ENDL; |
368 | } | 371 | } |
369 | 372 | ||
370 | start = delim + 3; | 373 | start = delim + 3; |
@@ -378,7 +381,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl( | |||
378 | if(!gVoiceClient->mConnected) | 381 | if(!gVoiceClient->mConnected) |
379 | { | 382 | { |
380 | // If voice has been disabled, we just want to close the socket. This does so. | 383 | // If voice has been disabled, we just want to close the socket. This does so. |
381 | LL_INFOS("Voice") << "returning STATUS_STOP" << LL_ENDL; | 384 | LL_INFOS("VivoxProtocolParser") << "returning STATUS_STOP" << LL_ENDL; |
382 | return STATUS_STOP; | 385 | return STATUS_STOP; |
383 | } | 386 | } |
384 | 387 | ||
@@ -1008,12 +1011,13 @@ static LLVoiceClientFriendsObserver *friendslist_listener = NULL; | |||
1008 | class LLVoiceClientCapResponder : public LLHTTPClient::Responder | 1011 | class LLVoiceClientCapResponder : public LLHTTPClient::Responder |
1009 | { | 1012 | { |
1010 | public: | 1013 | public: |
1011 | LLVoiceClientCapResponder(void){}; | 1014 | LLVoiceClientCapResponder(LLUUID response_id):mResponseID(response_id) {}; |
1012 | 1015 | ||
1013 | virtual void error(U32 status, const std::string& reason); // called with bad status codes | 1016 | virtual void error(U32 status, const std::string& reason); // called with bad status codes |
1014 | virtual void result(const LLSD& content); | 1017 | virtual void result(const LLSD& content); |
1015 | 1018 | ||
1016 | private: | 1019 | private: |
1020 | LLUUID mResponseID; | ||
1017 | }; | 1021 | }; |
1018 | 1022 | ||
1019 | void LLVoiceClientCapResponder::error(U32 status, const std::string& reason) | 1023 | void LLVoiceClientCapResponder::error(U32 status, const std::string& reason) |
@@ -1027,7 +1031,7 @@ void LLVoiceClientCapResponder::result(const LLSD& content) | |||
1027 | { | 1031 | { |
1028 | LLSD::map_const_iterator iter; | 1032 | LLSD::map_const_iterator iter; |
1029 | 1033 | ||
1030 | LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(content) << LL_ENDL; | 1034 | LL_DEBUGS("VoiceCaps") << "ParcelVoiceInfoRequest response:\n" << ll_pretty_print_sd(content) << LL_ENDL; |
1031 | 1035 | ||
1032 | if ( content.has("voice_credentials") ) | 1036 | if ( content.has("voice_credentials") ) |
1033 | { | 1037 | { |
@@ -1045,7 +1049,7 @@ void LLVoiceClientCapResponder::result(const LLSD& content) | |||
1045 | voice_credentials["channel_credentials"].asString(); | 1049 | voice_credentials["channel_credentials"].asString(); |
1046 | } | 1050 | } |
1047 | 1051 | ||
1048 | gVoiceClient->setSpatialChannel(uri, credentials); | 1052 | gVoiceClient->setSpatialChannel(uri, credentials, mResponseID); |
1049 | } | 1053 | } |
1050 | } | 1054 | } |
1051 | 1055 | ||
@@ -1126,6 +1130,8 @@ LLVoiceClient::LLVoiceClient() | |||
1126 | mAudioSessionChanged = false; | 1130 | mAudioSessionChanged = false; |
1127 | 1131 | ||
1128 | // Initial dirty state | 1132 | // Initial dirty state |
1133 | mAccountActive = false; | ||
1134 | mVAPRequested = false; | ||
1129 | mSpatialCoordsDirty = false; | 1135 | mSpatialCoordsDirty = false; |
1130 | mPTTDirty = true; | 1136 | mPTTDirty = true; |
1131 | mFriendsListDirty = true; | 1137 | mFriendsListDirty = true; |
@@ -1347,6 +1353,7 @@ void LLVoiceClient::userAuthorized(const std::string& firstName, const std::stri | |||
1347 | sConnectingToAgni = LLViewerLogin::getInstance()->isInProductionGrid(); | 1353 | sConnectingToAgni = LLViewerLogin::getInstance()->isInProductionGrid(); |
1348 | 1354 | ||
1349 | mAccountName = nameFromID(agentID); | 1355 | mAccountName = nameFromID(agentID); |
1356 | mAccountActive = true; | ||
1350 | } | 1357 | } |
1351 | 1358 | ||
1352 | void LLVoiceClient::requestVoiceAccountProvision(S32 retries) | 1359 | void LLVoiceClient::requestVoiceAccountProvision(S32 retries) |
@@ -1357,12 +1364,21 @@ void LLVoiceClient::requestVoiceAccountProvision(S32 retries) | |||
1357 | gAgent.getRegion()->getCapability( | 1364 | gAgent.getRegion()->getCapability( |
1358 | "ProvisionVoiceAccountRequest"); | 1365 | "ProvisionVoiceAccountRequest"); |
1359 | 1366 | ||
1360 | if ( url == "" ) return; | 1367 | if ( url.empty() ) |
1368 | { | ||
1369 | mVAPRequested = false; | ||
1370 | mAccountActive = false; | ||
1371 | setState(stateDisableCleanup); | ||
1372 | } | ||
1373 | |||
1374 | LL_DEBUGS("VoiceCaps") << "Got ProvisionVoiceAccountRequest capability: " | ||
1375 | << url << llendl; | ||
1361 | 1376 | ||
1377 | mVAPCapResponseID.generate(); | ||
1362 | LLHTTPClient::post( | 1378 | LLHTTPClient::post( |
1363 | url, | 1379 | url, |
1364 | LLSD(), | 1380 | LLSD(), |
1365 | new LLViewerVoiceAccountProvisionResponder(retries)); | 1381 | new LLViewerVoiceAccountProvisionResponder(retries, mVAPCapResponseID)); |
1366 | } | 1382 | } |
1367 | } | 1383 | } |
1368 | 1384 | ||
@@ -1370,11 +1386,44 @@ void LLVoiceClient::login( | |||
1370 | const std::string& account_name, | 1386 | const std::string& account_name, |
1371 | const std::string& password, | 1387 | const std::string& password, |
1372 | const std::string& voice_sip_uri_hostname, | 1388 | const std::string& voice_sip_uri_hostname, |
1373 | const std::string& voice_account_server_uri) | 1389 | const std::string& voice_account_server_uri, |
1390 | const LLUUID& response_id) | ||
1374 | { | 1391 | { |
1392 | if(response_id != mVAPCapResponseID) return; | ||
1393 | |||
1394 | std::string new_scheme; | ||
1395 | std::string old_scheme; | ||
1396 | if(!voice_account_server_uri.empty()) | ||
1397 | { | ||
1398 | new_scheme = voice_account_server_uri.substr(0, voice_account_server_uri.find("://")); | ||
1399 | } | ||
1400 | if(!mDaemonScheme.empty()) | ||
1401 | { | ||
1402 | old_scheme = mDaemonScheme; | ||
1403 | } | ||
1404 | else | ||
1405 | { | ||
1406 | old_scheme = new_scheme; | ||
1407 | } | ||
1408 | |||
1375 | mVoiceSIPURIHostName = voice_sip_uri_hostname; | 1409 | mVoiceSIPURIHostName = voice_sip_uri_hostname; |
1376 | mVoiceAccountServerURI = voice_account_server_uri; | 1410 | mVoiceAccountServerURI = voice_account_server_uri; |
1377 | 1411 | ||
1412 | |||
1413 | LL_DEBUGS("VoiceCaps") << "new_scheme: \"" << new_scheme << "\"" | ||
1414 | << "\nold_scheme: \"" << old_scheme << "\"" | ||
1415 | << "\ngateway running: " << ( isGatewayRunning() ? "true" : "false" ) << llendl; | ||
1416 | if(!isGatewayRunning() ) | ||
1417 | { | ||
1418 | loadDaemon(new_scheme); | ||
1419 | } | ||
1420 | else if(old_scheme != new_scheme) | ||
1421 | { | ||
1422 | mAccountActive = true; | ||
1423 | setState(stateDisableCleanup); | ||
1424 | } | ||
1425 | |||
1426 | |||
1378 | if(!mAccountHandle.empty()) | 1427 | if(!mAccountHandle.empty()) |
1379 | { | 1428 | { |
1380 | // Already logged in. | 1429 | // Already logged in. |
@@ -1432,6 +1481,183 @@ void LLVoiceClient::login( | |||
1432 | } | 1481 | } |
1433 | } | 1482 | } |
1434 | 1483 | ||
1484 | void LLVoiceClient::loadDaemon(const std::string& scheme) | ||
1485 | { | ||
1486 | |||
1487 | // Launch the voice daemon | ||
1488 | |||
1489 | |||
1490 | // *FIX:Mani - Using the executable dir instead | ||
1491 | // of mAppRODataDir, the working directory from which the app | ||
1492 | // is launched. | ||
1493 | //std::string exe_path = gDirUtilp->getAppRODataDir(); | ||
1494 | std::string exe_path = gDirUtilp->getExecutableDir(); | ||
1495 | exe_path += gDirUtilp->getDirDelimiter(); | ||
1496 | |||
1497 | #if LL_DARWIN | ||
1498 | exe_path += "../Resources/"; | ||
1499 | #endif | ||
1500 | |||
1501 | //exe_path += gSavedSettings.getString("VoiceModule"); | ||
1502 | llwarns << "Scheme: " << scheme << llendl; | ||
1503 | |||
1504 | std::string module; | ||
1505 | if (scheme == "tcp") | ||
1506 | { | ||
1507 | |||
1508 | module = gSavedSettings.getString("VoiceModuleMumble").empty() ? | ||
1509 | "mumble" : gSavedSettings.getString("VoiceModuleMumble"); | ||
1510 | } | ||
1511 | else | ||
1512 | { | ||
1513 | module = gSavedSettings.getString("VoiceModuleVivox").empty() ? | ||
1514 | "SLVoice" : gSavedSettings.getString("VoiceModuleVivox"); | ||
1515 | } | ||
1516 | |||
1517 | size_t pos_to_tst = module.find_last_of("/\\"); | ||
1518 | if( pos_to_tst != std::string::npos ) | ||
1519 | { | ||
1520 | module = module.substr(pos_to_tst+1); | ||
1521 | } | ||
1522 | |||
1523 | #if LL_WINDOWS | ||
1524 | std::string extension = ".exe"; | ||
1525 | if ( module.rfind(extension) != module.length()-extension.length()) | ||
1526 | { | ||
1527 | module.append(extension); | ||
1528 | } | ||
1529 | #endif | ||
1530 | |||
1531 | exe_path.append(module); | ||
1532 | |||
1533 | // See if the vivox executable exists | ||
1534 | llstat s; | ||
1535 | if(!LLFile::stat(exe_path, &s)) | ||
1536 | { | ||
1537 | // vivox executable exists. Build the command line and launch the daemon. | ||
1538 | // SLIM SDK: these arguments are no longer necessary. | ||
1539 | // std::string args = " -p tcp -h -c"; | ||
1540 | std::string args; | ||
1541 | std::string cmd; | ||
1542 | std::string loglevel = gSavedSettings.getString("VivoxDebugLevel"); | ||
1543 | |||
1544 | if(loglevel.empty()) | ||
1545 | { | ||
1546 | loglevel = "-1"; // turn logging off completely | ||
1547 | } | ||
1548 | |||
1549 | args += " -ll "; | ||
1550 | args += loglevel; | ||
1551 | |||
1552 | llwarns << "Voice loaded from: " << exe_path << " " << args << LL_ENDL; | ||
1553 | |||
1554 | #if LL_WINDOWS | ||
1555 | PROCESS_INFORMATION pinfo; | ||
1556 | STARTUPINFOA sinfo; | ||
1557 | memset(&sinfo, 0, sizeof(sinfo)); | ||
1558 | std::string exe_dir = gDirUtilp->getAppRODataDir(); | ||
1559 | |||
1560 | |||
1561 | // So retarded. Windows requires that the second parameter to CreateProcessA be a writable (non-const) string... | ||
1562 | char *args2 = new char[args.size() + 1]; | ||
1563 | strcpy(args2, args.c_str()); | ||
1564 | |||
1565 | if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo)) | ||
1566 | { | ||
1567 | // DWORD dwErr = GetLastError(); | ||
1568 | } | ||
1569 | else | ||
1570 | { | ||
1571 | // foo = pinfo.dwProcessId; // get your pid here if you want to use it later on | ||
1572 | // CloseHandle(pinfo.hProcess); // stops leaks - nothing else | ||
1573 | sGatewayHandle = pinfo.hProcess; | ||
1574 | CloseHandle(pinfo.hThread); // stops leaks - nothing else | ||
1575 | } | ||
1576 | |||
1577 | delete[] args2; | ||
1578 | #else // LL_WINDOWS | ||
1579 | // This should be the same for mac and linux | ||
1580 | { | ||
1581 | std::vector<std::string> arglist; | ||
1582 | arglist.push_back(exe_path); | ||
1583 | |||
1584 | // Split the argument string into separate strings for each argument | ||
1585 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | ||
1586 | boost::char_separator<char> sep(" "); | ||
1587 | tokenizer tokens(args, sep); | ||
1588 | tokenizer::iterator token_iter; | ||
1589 | |||
1590 | for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) | ||
1591 | { | ||
1592 | arglist.push_back(*token_iter); | ||
1593 | } | ||
1594 | |||
1595 | // create an argv vector for the child process | ||
1596 | char **fakeargv = new char*[arglist.size() + 1]; | ||
1597 | int i; | ||
1598 | for(i=0; i < arglist.size(); i++) | ||
1599 | fakeargv[i] = const_cast<char*>(arglist[i].c_str()); | ||
1600 | |||
1601 | fakeargv[i] = NULL; | ||
1602 | |||
1603 | fflush(NULL); // flush all buffers before the child inherits them | ||
1604 | pid_t id = vfork(); | ||
1605 | if(id == 0) | ||
1606 | { | ||
1607 | // child | ||
1608 | execv(exe_path.c_str(), fakeargv); | ||
1609 | |||
1610 | // If we reach this point, the exec failed. | ||
1611 | // Use _exit() instead of exit() per the vfork man page. | ||
1612 | _exit(0); | ||
1613 | } | ||
1614 | |||
1615 | // parent | ||
1616 | delete[] fakeargv; | ||
1617 | sGatewayPID = id; | ||
1618 | |||
1619 | } | ||
1620 | |||
1621 | #endif // LL_WINDOWS | ||
1622 | |||
1623 | mDaemonScheme = scheme; | ||
1624 | mDaemonHost = LLHost(gSavedSettings.getString("VoiceHost").c_str(), gSavedSettings.getU32("VoicePort")); | ||
1625 | |||
1626 | // Dirty the states we'll need to sync with the daemon when it comes up. | ||
1627 | mPTTDirty = true; | ||
1628 | mMicVolumeDirty = true; | ||
1629 | mSpeakerVolumeDirty = true; | ||
1630 | mSpeakerMuteDirty = true; | ||
1631 | // These only need to be set if they're not default (i.e. empty string). | ||
1632 | mCaptureDeviceDirty = !mCaptureDevice.empty(); | ||
1633 | mRenderDeviceDirty = !mRenderDevice.empty(); | ||
1634 | |||
1635 | mMainSessionGroupHandle.clear(); | ||
1636 | |||
1637 | // kick in | ||
1638 | |||
1639 | mUpdateTimer.start(); | ||
1640 | mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); | ||
1641 | |||
1642 | setState(stateDaemonLaunched); | ||
1643 | |||
1644 | //trigger parcel changed in the state engine | ||
1645 | mCurrentRegionName.append("kick in"); | ||
1646 | |||
1647 | |||
1648 | } | ||
1649 | else | ||
1650 | { | ||
1651 | LL_WARNS("Voice") << exe_path << " not found." << LL_ENDL; | ||
1652 | mAccountActive = false; | ||
1653 | setState(stateDisableCleanup); | ||
1654 | } | ||
1655 | |||
1656 | // we are done, re-allow ProvisionVoiceAccountRequest | ||
1657 | mVAPRequested = false; | ||
1658 | } | ||
1659 | |||
1660 | |||
1435 | void LLVoiceClient::idle(void* user_data) | 1661 | void LLVoiceClient::idle(void* user_data) |
1436 | { | 1662 | { |
1437 | LLVoiceClient* self = (LLVoiceClient*)user_data; | 1663 | LLVoiceClient* self = (LLVoiceClient*)user_data; |
@@ -1537,11 +1763,20 @@ void LLVoiceClient::start() | |||
1537 | 1763 | ||
1538 | void LLVoiceClient::stateMachine() | 1764 | void LLVoiceClient::stateMachine() |
1539 | { | 1765 | { |
1766 | if( stateJail == getState()) | ||
1767 | { | ||
1768 | return; | ||
1769 | } | ||
1770 | |||
1771 | if(gSavedSettings.getBOOL("CmdLineDisableVoice")) | ||
1772 | { | ||
1773 | // Voice is locked out, we must not launch the vivox daemon. | ||
1774 | setState(stateJail); | ||
1775 | } | ||
1540 | 1776 | ||
1541 | // Disable voice as long as the viewer is disconnected from the sim (login/relog) | 1777 | // Disable voice as long as the viewer is disconnected from the sim (login/relog) |
1542 | setVoiceEnabled(!gDisconnected | 1778 | setVoiceEnabled(!gDisconnected |
1543 | && gSavedSettings.getBOOL("EnableVoiceChat") | 1779 | && gSavedSettings.getBOOL("EnableVoiceChat") ); |
1544 | && !gSavedSettings.getBOOL("CmdLineDisableVoice") ); | ||
1545 | 1780 | ||
1546 | if(mVoiceEnabled) | 1781 | if(mVoiceEnabled) |
1547 | { | 1782 | { |
@@ -1560,12 +1795,8 @@ void LLVoiceClient::stateMachine() | |||
1560 | { | 1795 | { |
1561 | // if voice was turned off after the daemon was launched but before we could connect to it, we may need to issue a kill. | 1796 | // if voice was turned off after the daemon was launched but before we could connect to it, we may need to issue a kill. |
1562 | LL_WARNS("Voice") << "Disabling voice before connection to daemon, terminating." << LL_ENDL; | 1797 | LL_WARNS("Voice") << "Disabling voice before connection to daemon, terminating." << LL_ENDL; |
1563 | killGateway(); | ||
1564 | } | 1798 | } |
1565 | 1799 | ||
1566 | logout(); | ||
1567 | connectorShutdown(); | ||
1568 | |||
1569 | setState(stateDisableCleanup); | 1800 | setState(stateDisableCleanup); |
1570 | } | 1801 | } |
1571 | } | 1802 | } |
@@ -1580,42 +1811,23 @@ void LLVoiceClient::stateMachine() | |||
1580 | { | 1811 | { |
1581 | S32 parcelLocalID = parcel->getLocalID(); | 1812 | S32 parcelLocalID = parcel->getLocalID(); |
1582 | std::string regionName = region->getName(); | 1813 | std::string regionName = region->getName(); |
1583 | std::string capURI = region->getCapability("ParcelVoiceInfoRequest"); | 1814 | |
1584 | |||
1585 | // LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL; | ||
1586 | 1815 | ||
1587 | // The region name starts out empty and gets filled in later. | 1816 | // The region name starts out empty and gets filled in later. |
1588 | // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes. | 1817 | // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes. |
1589 | // If either is empty, wait for the next time around. | 1818 | // If either is empty, wait for the next time around. |
1590 | if(!regionName.empty()) | 1819 | if(/*getState() >= stateNoChannel &&*/ !regionName.empty()) |
1591 | { | 1820 | { |
1592 | if(!capURI.empty()) | 1821 | |
1593 | { | 1822 | if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName)) |
1594 | if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName)) | ||
1595 | { | ||
1596 | // We have changed parcels. Initiate a parcel channel lookup. | ||
1597 | mCurrentParcelLocalID = parcelLocalID; | ||
1598 | mCurrentRegionName = regionName; | ||
1599 | |||
1600 | parcelChanged(); | ||
1601 | } | ||
1602 | } | ||
1603 | else | ||
1604 | { | 1823 | { |
1605 | static int count = 0; | 1824 | // We have changed parcels. Initiate a parcel channel lookup. |
1606 | static int count2 = 0; | 1825 | mCurrentParcelLocalID = parcelLocalID; |
1607 | static int num = 1; | 1826 | mCurrentRegionName = regionName; |
1608 | ++count; | 1827 | |
1609 | if (count % num == 0) | 1828 | parcelChanged(); |
1610 | { | ||
1611 | LL_DEBUGS("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long (" << count << ")." << LL_ENDL; | ||
1612 | if (num < 1000 && ++count2 == 10) | ||
1613 | { | ||
1614 | num *= 10; | ||
1615 | count2 = 0; | ||
1616 | } | ||
1617 | } | ||
1618 | } | 1829 | } |
1830 | |||
1619 | } | 1831 | } |
1620 | } | 1832 | } |
1621 | } | 1833 | } |
@@ -1624,22 +1836,34 @@ void LLVoiceClient::stateMachine() | |||
1624 | { | 1836 | { |
1625 | //MARK: stateDisableCleanup | 1837 | //MARK: stateDisableCleanup |
1626 | case stateDisableCleanup: | 1838 | case stateDisableCleanup: |
1627 | // Clean up and reset everything. | 1839 | // Clean up and reset everything. |
1840 | |||
1841 | mVAPCapResponseID.setNull(); | ||
1842 | mPIRCapResponseID.setNull(); | ||
1843 | |||
1844 | if(isGatewayRunning()) | ||
1845 | { | ||
1846 | killGateway(); | ||
1847 | } | ||
1848 | logoutSendMessage(); | ||
1849 | mConnected = false; | ||
1850 | |||
1851 | |||
1628 | closeSocket(); | 1852 | closeSocket(); |
1629 | deleteAllSessions(); | 1853 | deleteAllSessions(); |
1630 | deleteAllBuddies(); | 1854 | deleteAllBuddies(); |
1631 | 1855 | ||
1632 | mConnectorHandle.clear(); | 1856 | mConnectorHandle.clear(); |
1633 | mAccountHandle.clear(); | 1857 | mAccountHandle.clear(); |
1634 | mAccountPassword.clear(); | 1858 | mAccountPassword.clear(); |
1635 | mVoiceAccountServerURI.clear(); | 1859 | mVoiceAccountServerURI.clear(); |
1636 | 1860 | mVAPRequested = false; | |
1637 | setState(stateDisabled); | 1861 | setState(stateDisabled); |
1638 | break; | 1862 | break; |
1639 | 1863 | ||
1640 | //MARK: stateDisabled | 1864 | //MARK: stateDisabled |
1641 | case stateDisabled: | 1865 | case stateDisabled: |
1642 | if(mTuningMode || (mVoiceEnabled && !mAccountName.empty())) | 1866 | if(mTuningMode || (mVoiceEnabled && mAccountActive && !mAccountName.empty())) |
1643 | { | 1867 | { |
1644 | setState(stateStart); | 1868 | setState(stateStart); |
1645 | } | 1869 | } |
@@ -1647,165 +1871,26 @@ void LLVoiceClient::stateMachine() | |||
1647 | 1871 | ||
1648 | //MARK: stateStart | 1872 | //MARK: stateStart |
1649 | case stateStart: | 1873 | case stateStart: |
1650 | if(gSavedSettings.getBOOL("CmdLineDisableVoice")) | 1874 | { |
1875 | bool have_region = (NULL != gAgent.getRegion() ); | ||
1876 | if(mVoiceEnabled && !mVAPRequested && !mAccountName.empty() && have_region) | ||
1651 | { | 1877 | { |
1652 | // Voice is locked out, we must not launch the vivox daemon. | 1878 | mVAPRequested = true; |
1653 | setState(stateJail); | 1879 | requestVoiceAccountProvision(); |
1654 | } | 1880 | } |
1655 | else if(!isGatewayRunning()) | 1881 | } break; |
1656 | { | ||
1657 | if(true) | ||
1658 | { | ||
1659 | // Launch the voice daemon | ||
1660 | |||
1661 | // *FIX:Mani - Using the executable dir instead | ||
1662 | // of mAppRODataDir, the working directory from which the app | ||
1663 | // is launched. | ||
1664 | //std::string exe_path = gDirUtilp->getAppRODataDir(); | ||
1665 | std::string exe_path = gDirUtilp->getExecutableDir(); | ||
1666 | exe_path += gDirUtilp->getDirDelimiter(); | ||
1667 | #if LL_DARWIN | ||
1668 | exe_path += "../Resources/"; | ||
1669 | #endif | ||
1670 | exe_path += gSavedSettings.getString("VoiceModule"); | ||
1671 | #if LL_WINDOWS | ||
1672 | exe_path += ".exe"; | ||
1673 | #endif | ||
1674 | // See if the vivox executable exists | ||
1675 | llstat s; | ||
1676 | if(!LLFile::stat(exe_path, &s)) | ||
1677 | { | ||
1678 | // vivox executable exists. Build the command line and launch the daemon. | ||
1679 | // SLIM SDK: these arguments are no longer necessary. | ||
1680 | // std::string args = " -p tcp -h -c"; | ||
1681 | std::string args; | ||
1682 | std::string cmd; | ||
1683 | std::string loglevel = gSavedSettings.getString("VivoxDebugLevel"); | ||
1684 | |||
1685 | if(loglevel.empty()) | ||
1686 | { | ||
1687 | loglevel = "-1"; // turn logging off completely | ||
1688 | } | ||
1689 | |||
1690 | args += " -ll "; | ||
1691 | args += loglevel; | ||
1692 | |||
1693 | LL_DEBUGS("Voice") << "Args for SLVoice: " << args << LL_ENDL; | ||
1694 | |||
1695 | #if LL_WINDOWS | ||
1696 | PROCESS_INFORMATION pinfo; | ||
1697 | STARTUPINFOA sinfo; | ||
1698 | memset(&sinfo, 0, sizeof(sinfo)); | ||
1699 | std::string exe_dir = gDirUtilp->getAppRODataDir(); | ||
1700 | cmd = gSavedSettings.getString("VoiceModule"); | ||
1701 | cmd += ".exe"; | ||
1702 | cmd += args; | ||
1703 | |||
1704 | // So retarded. Windows requires that the second parameter to CreateProcessA be a writable (non-const) string... | ||
1705 | char *args2 = new char[args.size() + 1]; | ||
1706 | strcpy(args2, args.c_str()); | ||
1707 | |||
1708 | if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo)) | ||
1709 | { | ||
1710 | // DWORD dwErr = GetLastError(); | ||
1711 | } | ||
1712 | else | ||
1713 | { | ||
1714 | // foo = pinfo.dwProcessId; // get your pid here if you want to use it later on | ||
1715 | // CloseHandle(pinfo.hProcess); // stops leaks - nothing else | ||
1716 | sGatewayHandle = pinfo.hProcess; | ||
1717 | CloseHandle(pinfo.hThread); // stops leaks - nothing else | ||
1718 | } | ||
1719 | |||
1720 | delete[] args2; | ||
1721 | #else // LL_WINDOWS | ||
1722 | // This should be the same for mac and linux | ||
1723 | { | ||
1724 | std::vector<std::string> arglist; | ||
1725 | arglist.push_back(exe_path); | ||
1726 | |||
1727 | // Split the argument string into separate strings for each argument | ||
1728 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | ||
1729 | boost::char_separator<char> sep(" "); | ||
1730 | tokenizer tokens(args, sep); | ||
1731 | tokenizer::iterator token_iter; | ||
1732 | |||
1733 | for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) | ||
1734 | { | ||
1735 | arglist.push_back(*token_iter); | ||
1736 | } | ||
1737 | |||
1738 | // create an argv vector for the child process | ||
1739 | char **fakeargv = new char*[arglist.size() + 1]; | ||
1740 | int i; | ||
1741 | for(i=0; i < arglist.size(); i++) | ||
1742 | fakeargv[i] = const_cast<char*>(arglist[i].c_str()); | ||
1743 | |||
1744 | fakeargv[i] = NULL; | ||
1745 | |||
1746 | fflush(NULL); // flush all buffers before the child inherits them | ||
1747 | pid_t id = vfork(); | ||
1748 | if(id == 0) | ||
1749 | { | ||
1750 | // child | ||
1751 | execv(exe_path.c_str(), fakeargv); | ||
1752 | |||
1753 | // If we reach this point, the exec failed. | ||
1754 | // Use _exit() instead of exit() per the vfork man page. | ||
1755 | _exit(0); | ||
1756 | } | ||
1757 | |||
1758 | // parent | ||
1759 | delete[] fakeargv; | ||
1760 | sGatewayPID = id; | ||
1761 | } | ||
1762 | #endif // LL_WINDOWS | ||
1763 | mDaemonHost = LLHost(gSavedSettings.getString("VoiceHost").c_str(), gSavedSettings.getU32("VoicePort")); | ||
1764 | } | ||
1765 | else | ||
1766 | { | ||
1767 | LL_WARNS("Voice") << exe_path << " not found." << LL_ENDL; | ||
1768 | mVoiceEnabled = false; | ||
1769 | } | ||
1770 | } | ||
1771 | else | ||
1772 | { | ||
1773 | // SLIM SDK: port changed from 44124 to 44125. | ||
1774 | // We can connect to a client gateway running on another host. This is useful for testing. | ||
1775 | // To do this, launch the gateway on a nearby host like this: | ||
1776 | // vivox-gw.exe -p tcp -i 0.0.0.0:44125 | ||
1777 | // and put that host's IP address here. | ||
1778 | mDaemonHost = LLHost(gSavedSettings.getString("VoiceHost"), gSavedSettings.getU32("VoicePort")); | ||
1779 | } | ||
1780 | |||
1781 | mUpdateTimer.start(); | ||
1782 | mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); | ||
1783 | |||
1784 | setState(stateDaemonLaunched); | ||
1785 | |||
1786 | // Dirty the states we'll need to sync with the daemon when it comes up. | ||
1787 | mPTTDirty = true; | ||
1788 | mMicVolumeDirty = true; | ||
1789 | mSpeakerVolumeDirty = true; | ||
1790 | mSpeakerMuteDirty = true; | ||
1791 | // These only need to be set if they're not default (i.e. empty string). | ||
1792 | mCaptureDeviceDirty = !mCaptureDevice.empty(); | ||
1793 | mRenderDeviceDirty = !mRenderDevice.empty(); | ||
1794 | |||
1795 | mMainSessionGroupHandle.clear(); | ||
1796 | } | ||
1797 | break; | ||
1798 | 1882 | ||
1799 | //MARK: stateDaemonLaunched | 1883 | //MARK: stateDaemonLaunched |
1800 | case stateDaemonLaunched: | 1884 | case stateDaemonLaunched: |
1801 | if(mUpdateTimer.hasExpired()) | 1885 | if(mUpdateTimer.hasExpired()) |
1802 | { | 1886 | { |
1803 | LL_DEBUGS("Voice") << "Connecting to vivox daemon" << LL_ENDL; | 1887 | |
1804 | |||
1805 | mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); | 1888 | mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS); |
1806 | 1889 | ||
1807 | if(!mSocket) | 1890 | if(!mSocket) |
1808 | { | 1891 | { |
1892 | LL_DEBUGS("VoiceDaemon") << "Connecting to voice daemon. Protocol: " | ||
1893 | << mDaemonScheme << LL_ENDL; | ||
1809 | mSocket = LLSocket::create(LLSocket::STREAM_TCP); | 1894 | mSocket = LLSocket::create(LLSocket::STREAM_TCP); |
1810 | } | 1895 | } |
1811 | 1896 | ||
@@ -1817,6 +1902,7 @@ void LLVoiceClient::stateMachine() | |||
1817 | else | 1902 | else |
1818 | { | 1903 | { |
1819 | // If the connect failed, the socket may have been put into a bad state. Delete it. | 1904 | // If the connect failed, the socket may have been put into a bad state. Delete it. |
1905 | LL_DEBUGS("VoiceDaemon") << "voice daemon not ready yet, retrying" << LL_ENDL; | ||
1820 | closeSocket(); | 1906 | closeSocket(); |
1821 | } | 1907 | } |
1822 | } | 1908 | } |
@@ -1871,24 +1957,16 @@ void LLVoiceClient::stateMachine() | |||
1871 | } | 1957 | } |
1872 | else if(!mAccountName.empty() && mVoiceEnabled) | 1958 | else if(!mAccountName.empty() && mVoiceEnabled) |
1873 | { | 1959 | { |
1874 | LLViewerRegion *region = gAgent.getRegion(); | 1960 | if ( mAccountPassword.empty() ) |
1875 | |||
1876 | if(region) | ||
1877 | { | 1961 | { |
1878 | if ( region->getCapability("ProvisionVoiceAccountRequest") != "" ) | 1962 | requestVoiceAccountProvision(); |
1879 | { | 1963 | } |
1880 | if ( mAccountPassword.empty() ) | 1964 | else |
1881 | { | 1965 | { |
1882 | requestVoiceAccountProvision(); | 1966 | setState(stateConnectorStart); |
1883 | } | ||
1884 | setState(stateConnectorStart); | ||
1885 | } | ||
1886 | else | ||
1887 | { | ||
1888 | LL_DEBUGS("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL; | ||
1889 | } | ||
1890 | } | 1967 | } |
1891 | } | 1968 | } |
1969 | |||
1892 | break; | 1970 | break; |
1893 | 1971 | ||
1894 | //MARK: stateMicTuningStart | 1972 | //MARK: stateMicTuningStart |
@@ -2025,7 +2103,8 @@ void LLVoiceClient::stateMachine() | |||
2025 | if(mLoginRetryCount > MAX_LOGIN_RETRIES) | 2103 | if(mLoginRetryCount > MAX_LOGIN_RETRIES) |
2026 | { | 2104 | { |
2027 | LL_WARNS("Voice") << "too many login retries, giving up." << LL_ENDL; | 2105 | LL_WARNS("Voice") << "too many login retries, giving up." << LL_ENDL; |
2028 | setState(stateLoginFailed); | 2106 | mAccountActive = false; |
2107 | setState(stateDisableCleanup); | ||
2029 | } | 2108 | } |
2030 | else | 2109 | else |
2031 | { | 2110 | { |
@@ -2569,7 +2648,7 @@ void LLVoiceClient::sessionGroupCreateSendMessage() | |||
2569 | 2648 | ||
2570 | void LLVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAudio, bool startText) | 2649 | void LLVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAudio, bool startText) |
2571 | { | 2650 | { |
2572 | LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; | 2651 | LL_DEBUGS("VoiceSession") << "requesting create: " << session->mSIPURI << LL_ENDL; |
2573 | 2652 | ||
2574 | session->mCreateInProgress = true; | 2653 | session->mCreateInProgress = true; |
2575 | if(startAudio) | 2654 | if(startAudio) |
@@ -2605,7 +2684,7 @@ void LLVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAu | |||
2605 | 2684 | ||
2606 | void LLVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio, bool startText) | 2685 | void LLVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio, bool startText) |
2607 | { | 2686 | { |
2608 | LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; | 2687 | LL_DEBUGS("VoiceSession") << "requesting create: " << session->mSIPURI << LL_ENDL; |
2609 | 2688 | ||
2610 | session->mCreateInProgress = true; | 2689 | session->mCreateInProgress = true; |
2611 | if(startAudio) | 2690 | if(startAudio) |
@@ -2642,7 +2721,7 @@ void LLVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session, boo | |||
2642 | 2721 | ||
2643 | void LLVoiceClient::sessionMediaConnectSendMessage(sessionState *session) | 2722 | void LLVoiceClient::sessionMediaConnectSendMessage(sessionState *session) |
2644 | { | 2723 | { |
2645 | LL_DEBUGS("Voice") << "connecting audio to session handle: " << session->mHandle << LL_ENDL; | 2724 | LL_DEBUGS("VoiceSession") << "connecting audio to session handle: " << session->mHandle << LL_ENDL; |
2646 | 2725 | ||
2647 | session->mMediaConnectInProgress = true; | 2726 | session->mMediaConnectInProgress = true; |
2648 | 2727 | ||
@@ -2660,7 +2739,7 @@ void LLVoiceClient::sessionMediaConnectSendMessage(sessionState *session) | |||
2660 | 2739 | ||
2661 | void LLVoiceClient::sessionTextConnectSendMessage(sessionState *session) | 2740 | void LLVoiceClient::sessionTextConnectSendMessage(sessionState *session) |
2662 | { | 2741 | { |
2663 | LL_DEBUGS("Voice") << "connecting text to session handle: " << session->mHandle << LL_ENDL; | 2742 | LL_DEBUGS("VoiceSession") << "connecting text to session handle: " << session->mHandle << LL_ENDL; |
2664 | 2743 | ||
2665 | std::ostringstream stream; | 2744 | std::ostringstream stream; |
2666 | 2745 | ||
@@ -2689,7 +2768,7 @@ void LLVoiceClient::leaveAudioSession() | |||
2689 | { | 2768 | { |
2690 | if(mAudioSession) | 2769 | if(mAudioSession) |
2691 | { | 2770 | { |
2692 | LL_DEBUGS("Voice") << "leaving session: " << mAudioSession->mSIPURI << LL_ENDL; | 2771 | LL_DEBUGS("VoiceSession") << "leaving session: " << mAudioSession->mSIPURI << LL_ENDL; |
2693 | 2772 | ||
2694 | switch(getState()) | 2773 | switch(getState()) |
2695 | { | 2774 | { |
@@ -2724,7 +2803,7 @@ void LLVoiceClient::leaveAudioSession() | |||
2724 | } | 2803 | } |
2725 | else | 2804 | else |
2726 | { | 2805 | { |
2727 | LL_WARNS("Voice") << "called with no session handle" << LL_ENDL; | 2806 | LL_WARNS("VoiceSession") << "called with no session handle" << LL_ENDL; |
2728 | setState(stateSessionTerminated); | 2807 | setState(stateSessionTerminated); |
2729 | } | 2808 | } |
2730 | break; | 2809 | break; |
@@ -2734,13 +2813,13 @@ void LLVoiceClient::leaveAudioSession() | |||
2734 | break; | 2813 | break; |
2735 | 2814 | ||
2736 | default: | 2815 | default: |
2737 | LL_WARNS("Voice") << "called from unknown state" << LL_ENDL; | 2816 | LL_WARNS("VoiceSession") << "called from unknown state" << LL_ENDL; |
2738 | break; | 2817 | break; |
2739 | } | 2818 | } |
2740 | } | 2819 | } |
2741 | else | 2820 | else |
2742 | { | 2821 | { |
2743 | LL_WARNS("Voice") << "called with no active session" << LL_ENDL; | 2822 | LL_WARNS("VoiceSession") << "called with no active session" << LL_ENDL; |
2744 | setState(stateSessionTerminated); | 2823 | setState(stateSessionTerminated); |
2745 | } | 2824 | } |
2746 | } | 2825 | } |
@@ -2749,7 +2828,7 @@ void LLVoiceClient::sessionTerminateSendMessage(sessionState *session) | |||
2749 | { | 2828 | { |
2750 | std::ostringstream stream; | 2829 | std::ostringstream stream; |
2751 | 2830 | ||
2752 | LL_DEBUGS("Voice") << "Sending Session.Terminate with handle " << session->mHandle << LL_ENDL; | 2831 | LL_DEBUGS("VoiceSession") << "Sending Session.Terminate with handle " << session->mHandle << LL_ENDL; |
2753 | stream | 2832 | stream |
2754 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Terminate.1\">" | 2833 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.Terminate.1\">" |
2755 | << "<SessionHandle>" << session->mHandle << "</SessionHandle>" | 2834 | << "<SessionHandle>" << session->mHandle << "</SessionHandle>" |
@@ -2762,7 +2841,7 @@ void LLVoiceClient::sessionGroupTerminateSendMessage(sessionState *session) | |||
2762 | { | 2841 | { |
2763 | std::ostringstream stream; | 2842 | std::ostringstream stream; |
2764 | 2843 | ||
2765 | LL_DEBUGS("Voice") << "Sending SessionGroup.Terminate with handle " << session->mGroupHandle << LL_ENDL; | 2844 | LL_DEBUGS("VoiceSession") << "Sending SessionGroup.Terminate with handle " << session->mGroupHandle << LL_ENDL; |
2766 | stream | 2845 | stream |
2767 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Terminate.1\">" | 2846 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"SessionGroup.Terminate.1\">" |
2768 | << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" | 2847 | << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" |
@@ -2775,7 +2854,7 @@ void LLVoiceClient::sessionMediaDisconnectSendMessage(sessionState *session) | |||
2775 | { | 2854 | { |
2776 | std::ostringstream stream; | 2855 | std::ostringstream stream; |
2777 | 2856 | ||
2778 | LL_DEBUGS("Voice") << "Sending Session.MediaDisconnect with handle " << session->mHandle << LL_ENDL; | 2857 | LL_DEBUGS("VoiceSession") << "Sending Session.MediaDisconnect with handle " << session->mHandle << LL_ENDL; |
2779 | stream | 2858 | stream |
2780 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.MediaDisconnect.1\">" | 2859 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.MediaDisconnect.1\">" |
2781 | << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" | 2860 | << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" |
@@ -2791,7 +2870,7 @@ void LLVoiceClient::sessionTextDisconnectSendMessage(sessionState *session) | |||
2791 | { | 2870 | { |
2792 | std::ostringstream stream; | 2871 | std::ostringstream stream; |
2793 | 2872 | ||
2794 | LL_DEBUGS("Voice") << "Sending Session.TextDisconnect with handle " << session->mHandle << LL_ENDL; | 2873 | LL_DEBUGS("VoiceSession") << "Sending Session.TextDisconnect with handle " << session->mHandle << LL_ENDL; |
2795 | stream | 2874 | stream |
2796 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.TextDisconnect.1\">" | 2875 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.TextDisconnect.1\">" |
2797 | << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" | 2876 | << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" |
@@ -2823,13 +2902,13 @@ void LLVoiceClient::getRenderDevicesSendMessage() | |||
2823 | 2902 | ||
2824 | void LLVoiceClient::clearCaptureDevices() | 2903 | void LLVoiceClient::clearCaptureDevices() |
2825 | { | 2904 | { |
2826 | LL_DEBUGS("Voice") << "called" << LL_ENDL; | 2905 | LL_DEBUGS("VoiceDevice") << "called" << LL_ENDL; |
2827 | mCaptureDevices.clear(); | 2906 | mCaptureDevices.clear(); |
2828 | } | 2907 | } |
2829 | 2908 | ||
2830 | void LLVoiceClient::addCaptureDevice(const std::string& name) | 2909 | void LLVoiceClient::addCaptureDevice(const std::string& name) |
2831 | { | 2910 | { |
2832 | LL_DEBUGS("Voice") << name << LL_ENDL; | 2911 | LL_DEBUGS("VoiceDevice") << name << LL_ENDL; |
2833 | 2912 | ||
2834 | mCaptureDevices.push_back(name); | 2913 | mCaptureDevices.push_back(name); |
2835 | } | 2914 | } |
@@ -2861,13 +2940,13 @@ void LLVoiceClient::setCaptureDevice(const std::string& name) | |||
2861 | 2940 | ||
2862 | void LLVoiceClient::clearRenderDevices() | 2941 | void LLVoiceClient::clearRenderDevices() |
2863 | { | 2942 | { |
2864 | LL_DEBUGS("Voice") << "called" << LL_ENDL; | 2943 | LL_DEBUGS("VoiceDevice") << "called" << LL_ENDL; |
2865 | mRenderDevices.clear(); | 2944 | mRenderDevices.clear(); |
2866 | } | 2945 | } |
2867 | 2946 | ||
2868 | void LLVoiceClient::addRenderDevice(const std::string& name) | 2947 | void LLVoiceClient::addRenderDevice(const std::string& name) |
2869 | { | 2948 | { |
2870 | LL_DEBUGS("Voice") << name << LL_ENDL; | 2949 | LL_DEBUGS("VoiceDevice") << name << LL_ENDL; |
2871 | mRenderDevices.push_back(name); | 2950 | mRenderDevices.push_back(name); |
2872 | } | 2951 | } |
2873 | 2952 | ||
@@ -2951,7 +3030,7 @@ void LLVoiceClient::tuningRenderStopSendMessage() | |||
2951 | 3030 | ||
2952 | void LLVoiceClient::tuningCaptureStartSendMessage(int duration) | 3031 | void LLVoiceClient::tuningCaptureStartSendMessage(int duration) |
2953 | { | 3032 | { |
2954 | LL_DEBUGS("Voice") << "sending CaptureAudioStart" << LL_ENDL; | 3033 | LL_DEBUGS("VoiceDevice") << "sending CaptureAudioStart" << LL_ENDL; |
2955 | 3034 | ||
2956 | std::ostringstream stream; | 3035 | std::ostringstream stream; |
2957 | stream | 3036 | stream |
@@ -2964,7 +3043,7 @@ void LLVoiceClient::tuningCaptureStartSendMessage(int duration) | |||
2964 | 3043 | ||
2965 | void LLVoiceClient::tuningCaptureStopSendMessage() | 3044 | void LLVoiceClient::tuningCaptureStopSendMessage() |
2966 | { | 3045 | { |
2967 | LL_DEBUGS("Voice") << "sending CaptureAudioStop" << LL_ENDL; | 3046 | LL_DEBUGS("VoiceDevice") << "sending CaptureAudioStop" << LL_ENDL; |
2968 | 3047 | ||
2969 | std::ostringstream stream; | 3048 | std::ostringstream stream; |
2970 | stream | 3049 | stream |
@@ -3038,12 +3117,8 @@ void LLVoiceClient::daemonDied() | |||
3038 | 3117 | ||
3039 | void LLVoiceClient::giveUp() | 3118 | void LLVoiceClient::giveUp() |
3040 | { | 3119 | { |
3041 | // All has failed. Clean up and stop trying. | 3120 | mAccountActive = false; |
3042 | closeSocket(); | 3121 | setState(stateDisableCleanup); |
3043 | deleteAllSessions(); | ||
3044 | deleteAllBuddies(); | ||
3045 | |||
3046 | setState(stateJail); | ||
3047 | } | 3122 | } |
3048 | 3123 | ||
3049 | static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVector3d &pos, LLVector3 &vel) | 3124 | static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVector3d &pos, LLVector3 &vel) |
@@ -3378,7 +3453,7 @@ void LLVoiceClient::buildSetCaptureDevice(std::ostringstream &stream) | |||
3378 | { | 3453 | { |
3379 | if(mCaptureDeviceDirty) | 3454 | if(mCaptureDeviceDirty) |
3380 | { | 3455 | { |
3381 | LL_DEBUGS("Voice") << "Setting input device = \"" << mCaptureDevice << "\"" << LL_ENDL; | 3456 | LL_DEBUGS("VoiceDevice") << "Setting input device = \"" << mCaptureDevice << "\"" << LL_ENDL; |
3382 | 3457 | ||
3383 | stream | 3458 | stream |
3384 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetCaptureDevice.1\">" | 3459 | << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetCaptureDevice.1\">" |
@@ -4099,29 +4174,29 @@ void LLVoiceClient::reapSession(sessionState *session) | |||
4099 | { | 4174 | { |
4100 | if(!session->mHandle.empty()) | 4175 | if(!session->mHandle.empty()) |
4101 | { | 4176 | { |
4102 | LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (non-null session handle)" << LL_ENDL; | 4177 | LL_DEBUGS("VoiceSession") << "NOT deleting session " << session->mSIPURI << " (non-null session handle)" << LL_ENDL; |
4103 | } | 4178 | } |
4104 | else if(session->mCreateInProgress) | 4179 | else if(session->mCreateInProgress) |
4105 | { | 4180 | { |
4106 | LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (create in progress)" << LL_ENDL; | 4181 | LL_DEBUGS("VoiceSession") << "NOT deleting session " << session->mSIPURI << " (create in progress)" << LL_ENDL; |
4107 | } | 4182 | } |
4108 | else if(session->mMediaConnectInProgress) | 4183 | else if(session->mMediaConnectInProgress) |
4109 | { | 4184 | { |
4110 | LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (connect in progress)" << LL_ENDL; | 4185 | LL_DEBUGS("VoiceSession") << "NOT deleting session " << session->mSIPURI << " (connect in progress)" << LL_ENDL; |
4111 | } | 4186 | } |
4112 | else if(session == mAudioSession) | 4187 | else if(session == mAudioSession) |
4113 | { | 4188 | { |
4114 | LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the current session)" << LL_ENDL; | 4189 | LL_DEBUGS("VoiceSession") << "NOT deleting session " << session->mSIPURI << " (it's the current session)" << LL_ENDL; |
4115 | } | 4190 | } |
4116 | else if(session == mNextAudioSession) | 4191 | else if(session == mNextAudioSession) |
4117 | { | 4192 | { |
4118 | LL_DEBUGS("Voice") << "NOT deleting session " << session->mSIPURI << " (it's the next session)" << LL_ENDL; | 4193 | LL_DEBUGS("VoiceSession") << "NOT deleting session " << session->mSIPURI << " (it's the next session)" << LL_ENDL; |
4119 | } | 4194 | } |
4120 | else | 4195 | else |
4121 | { | 4196 | { |
4122 | // TODO: Question: Should we check for queued text messages here? | 4197 | // TODO: Question: Should we check for queued text messages here? |
4123 | // We don't have a reason to keep tracking this session, so just delete it. | 4198 | // We don't have a reason to keep tracking this session, so just delete it. |
4124 | LL_DEBUGS("Voice") << "deleting session " << session->mSIPURI << LL_ENDL; | 4199 | LL_DEBUGS("VoiceSession") << "deleting session " << session->mSIPURI << LL_ENDL; |
4125 | deleteSession(session); | 4200 | deleteSession(session); |
4126 | session = NULL; | 4201 | session = NULL; |
4127 | } | 4202 | } |
@@ -4179,17 +4254,17 @@ void LLVoiceClient::leftAudioSession( | |||
4179 | case stateJoinSessionFailed: | 4254 | case stateJoinSessionFailed: |
4180 | case stateJoinSessionFailedWaiting: | 4255 | case stateJoinSessionFailedWaiting: |
4181 | // normal transition | 4256 | // normal transition |
4182 | LL_DEBUGS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; | 4257 | LL_DEBUGS("VoiceSession") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; |
4183 | setState(stateSessionTerminated); | 4258 | setState(stateSessionTerminated); |
4184 | break; | 4259 | break; |
4185 | 4260 | ||
4186 | case stateSessionTerminated: | 4261 | case stateSessionTerminated: |
4187 | // this will happen sometimes -- there are cases where we send the terminate and then go straight to this state. | 4262 | // this will happen sometimes -- there are cases where we send the terminate and then go straight to this state. |
4188 | LL_WARNS("Voice") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; | 4263 | LL_WARNS("VoiceSession") << "left session " << session->mHandle << " in state " << state2string(getState()) << LL_ENDL; |
4189 | break; | 4264 | break; |
4190 | 4265 | ||
4191 | default: | 4266 | default: |
4192 | LL_WARNS("Voice") << "unexpected SessionStateChangeEvent (left session) in state " << state2string(getState()) << LL_ENDL; | 4267 | LL_WARNS("VoiceSession") << "unexpected SessionStateChangeEvent (left session) in state " << state2string(getState()) << LL_ENDL; |
4193 | setState(stateSessionTerminated); | 4268 | setState(stateSessionTerminated); |
4194 | break; | 4269 | break; |
4195 | } | 4270 | } |
@@ -4249,7 +4324,7 @@ void LLVoiceClient::mediaStreamUpdatedEvent( | |||
4249 | { | 4324 | { |
4250 | sessionState *session = findSession(sessionHandle); | 4325 | sessionState *session = findSession(sessionHandle); |
4251 | 4326 | ||
4252 | LL_DEBUGS("Voice") << "session " << sessionHandle << ", status code " << statusCode << ", string \"" << statusString << "\"" << LL_ENDL; | 4327 | LL_DEBUGS("VoiceSession") << "session " << sessionHandle << ", status code " << statusCode << ", string \"" << statusString << "\"" << LL_ENDL; |
4253 | 4328 | ||
4254 | if(session) | 4329 | if(session) |
4255 | { | 4330 | { |
@@ -4314,7 +4389,7 @@ void LLVoiceClient::mediaStreamUpdatedEvent( | |||
4314 | } | 4389 | } |
4315 | else | 4390 | else |
4316 | { | 4391 | { |
4317 | LL_WARNS("Voice") << "session " << sessionHandle << "not found"<< LL_ENDL; | 4392 | LL_WARNS("VoiceSession") << "session " << sessionHandle << "not found"<< LL_ENDL; |
4318 | } | 4393 | } |
4319 | } | 4394 | } |
4320 | 4395 | ||
@@ -4435,7 +4510,7 @@ void LLVoiceClient::participantRemovedEvent( | |||
4435 | } | 4510 | } |
4436 | else | 4511 | else |
4437 | { | 4512 | { |
4438 | LL_DEBUGS("Voice") << "unknown session " << sessionHandle << LL_ENDL; | 4513 | LL_DEBUGS("VoiceSession") << "unknown session " << sessionHandle << LL_ENDL; |
4439 | } | 4514 | } |
4440 | } | 4515 | } |
4441 | 4516 | ||
@@ -4479,7 +4554,7 @@ void LLVoiceClient::participantUpdatedEvent( | |||
4479 | } | 4554 | } |
4480 | else | 4555 | else |
4481 | { | 4556 | { |
4482 | LL_WARNS("Voice") << "unknown session " << sessionHandle << LL_ENDL; | 4557 | LL_WARNS("VoiceSession") << "unknown session " << sessionHandle << LL_ENDL; |
4483 | } | 4558 | } |
4484 | } | 4559 | } |
4485 | 4560 | ||
@@ -5058,22 +5133,34 @@ LLVoiceClient::participantState* LLVoiceClient::findParticipantByID(const LLUUID | |||
5058 | 5133 | ||
5059 | void LLVoiceClient::parcelChanged() | 5134 | void LLVoiceClient::parcelChanged() |
5060 | { | 5135 | { |
5061 | if(getState() >= stateNoChannel) | 5136 | if( (getState() >= stateNoChannel) && !inNonSpatialChannel() ) |
5062 | { | 5137 | { |
5063 | // If the user is logged in, start a channel lookup. | 5138 | // If the user is logged in, start a channel lookup, |
5064 | LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL; | 5139 | // but not if already in a private call/conference. |
5140 | mAccountActive = true; | ||
5065 | 5141 | ||
5066 | std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); | 5142 | std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); |
5067 | LLSD data; | 5143 | LL_DEBUGS("VoiceCaps") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << " cap url:" << url << LL_ENDL; |
5068 | LLHTTPClient::post( | 5144 | if(! url.empty() ) |
5069 | url, | 5145 | { |
5070 | data, | 5146 | mPIRCapResponseID.generate(); |
5071 | new LLVoiceClientCapResponder); | 5147 | LLSD data; |
5148 | LLHTTPClient::post( | ||
5149 | url, | ||
5150 | data, | ||
5151 | new LLVoiceClientCapResponder(mPIRCapResponseID)); | ||
5152 | } | ||
5153 | else | ||
5154 | { | ||
5155 | mAccountActive = false; | ||
5156 | setState(stateDisableCleanup); | ||
5157 | } | ||
5072 | } | 5158 | } |
5073 | else | 5159 | else |
5074 | { | 5160 | { |
5161 | mAccountActive = true; | ||
5075 | // The transition to stateNoChannel needs to kick this off again. | 5162 | // The transition to stateNoChannel needs to kick this off again. |
5076 | LL_WARNS("Voice") << "not logged in yet, deferring" << LL_ENDL; | 5163 | LL_DEBUGS("Voice") << "not logged in yet, deferring" << LL_ENDL; |
5077 | } | 5164 | } |
5078 | } | 5165 | } |
5079 | 5166 | ||
@@ -5086,12 +5173,40 @@ void LLVoiceClient::switchChannel( | |||
5086 | { | 5173 | { |
5087 | bool needsSwitch = false; | 5174 | bool needsSwitch = false; |
5088 | 5175 | ||
5089 | LL_DEBUGS("Voice") | 5176 | LL_DEBUGS("VoiceSession") |
5090 | << "called in state " << state2string(getState()) | 5177 | << "Switch channel called in state " << state2string(getState()) |
5091 | << " with uri \"" << uri << "\"" | 5178 | << " with uri \"" << uri << "\"" |
5092 | << (spatial?", spatial is true":", spatial is false") | 5179 | << (spatial?", spatial is true":", spatial is false") |
5093 | << LL_ENDL; | 5180 | << LL_ENDL; |
5094 | 5181 | ||
5182 | size_t new_uri_find_sip = std::string::npos; | ||
5183 | size_t old_uri_find_sip = std::string::npos; | ||
5184 | if(!uri.empty()) | ||
5185 | { | ||
5186 | new_uri_find_sip = uri.find("sip:"); | ||
5187 | } | ||
5188 | |||
5189 | if( mNextAudioSession | ||
5190 | && !( mNextAudioSession->mSIPURI.empty() ) | ||
5191 | && (mNextAudioSession->mSIPURI != uri) ) | ||
5192 | { | ||
5193 | old_uri_find_sip = mNextAudioSession->mSIPURI.find("sip:"); | ||
5194 | } | ||
5195 | else | ||
5196 | { | ||
5197 | |||
5198 | // just logged in or voice disabled land in SL, | ||
5199 | // anyway right daemon is already up | ||
5200 | old_uri_find_sip = new_uri_find_sip; | ||
5201 | } | ||
5202 | |||
5203 | if(old_uri_find_sip != new_uri_find_sip) | ||
5204 | { | ||
5205 | mAccountActive = true; | ||
5206 | setState(stateDisableCleanup); | ||
5207 | return; | ||
5208 | } | ||
5209 | |||
5095 | switch(getState()) | 5210 | switch(getState()) |
5096 | { | 5211 | { |
5097 | case stateJoinSessionFailed: | 5212 | case stateJoinSessionFailed: |
@@ -5148,7 +5263,7 @@ void LLVoiceClient::switchChannel( | |||
5148 | if(uri.empty()) | 5263 | if(uri.empty()) |
5149 | { | 5264 | { |
5150 | // Leave any channel we may be in | 5265 | // Leave any channel we may be in |
5151 | LL_DEBUGS("Voice") << "leaving channel" << LL_ENDL; | 5266 | LL_DEBUGS("VoiceSession") << "leaving channel" << LL_ENDL; |
5152 | 5267 | ||
5153 | sessionState *oldSession = mNextAudioSession; | 5268 | sessionState *oldSession = mNextAudioSession; |
5154 | mNextAudioSession = NULL; | 5269 | mNextAudioSession = NULL; |
@@ -5160,7 +5275,7 @@ void LLVoiceClient::switchChannel( | |||
5160 | } | 5275 | } |
5161 | else | 5276 | else |
5162 | { | 5277 | { |
5163 | LL_DEBUGS("Voice") << "switching to channel " << uri << LL_ENDL; | 5278 | LL_DEBUGS("VoiceSession") << "switching to channel " << uri << LL_ENDL; |
5164 | 5279 | ||
5165 | mNextAudioSession = addSession(uri); | 5280 | mNextAudioSession = addSession(uri); |
5166 | mNextAudioSession->mHash = hash; | 5281 | mNextAudioSession->mHash = hash; |
@@ -5205,8 +5320,14 @@ void LLVoiceClient::setNonSpatialChannel( | |||
5205 | 5320 | ||
5206 | void LLVoiceClient::setSpatialChannel( | 5321 | void LLVoiceClient::setSpatialChannel( |
5207 | const std::string &uri, | 5322 | const std::string &uri, |
5208 | const std::string &credentials) | 5323 | const std::string &credentials, |
5324 | const LLUUID& response_id) | ||
5209 | { | 5325 | { |
5326 | if (response_id != mPIRCapResponseID) | ||
5327 | { | ||
5328 | return; | ||
5329 | } | ||
5330 | |||
5210 | mSpatialSessionURI = uri; | 5331 | mSpatialSessionURI = uri; |
5211 | mSpatialSessionCredentials = credentials; | 5332 | mSpatialSessionCredentials = credentials; |
5212 | mAreaVoiceDisabled = mSpatialSessionURI.empty(); | 5333 | mAreaVoiceDisabled = mSpatialSessionURI.empty(); |
@@ -5282,7 +5403,7 @@ bool LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::str | |||
5282 | } | 5403 | } |
5283 | else | 5404 | else |
5284 | { | 5405 | { |
5285 | LL_DEBUGS("Voice") << "Session not found for participant ID " << participant_id << LL_ENDL; | 5406 | LL_DEBUGS("VoiceSession") << "Session not found for participant ID " << participant_id << LL_ENDL; |
5286 | } | 5407 | } |
5287 | 5408 | ||
5288 | return result; | 5409 | return result; |
@@ -5331,7 +5452,7 @@ void LLVoiceClient::endUserIMSession(const LLUUID &uuid) | |||
5331 | } | 5452 | } |
5332 | else | 5453 | else |
5333 | { | 5454 | { |
5334 | LL_DEBUGS("Voice") << "Session not found for participant ID " << uuid << LL_ENDL; | 5455 | LL_DEBUGS("VoiceSession") << "Session not found for participant ID " << uuid << LL_ENDL; |
5335 | } | 5456 | } |
5336 | } | 5457 | } |
5337 | 5458 | ||
@@ -5452,7 +5573,7 @@ void LLVoiceClient::declineInvite(std::string &sessionHandle) | |||
5452 | 5573 | ||
5453 | void LLVoiceClient::leaveNonSpatialChannel() | 5574 | void LLVoiceClient::leaveNonSpatialChannel() |
5454 | { | 5575 | { |
5455 | LL_DEBUGS("Voice") | 5576 | LL_DEBUGS("VoiceSession") |
5456 | << "called in state " << state2string(getState()) | 5577 | << "called in state " << state2string(getState()) |
5457 | << LL_ENDL; | 5578 | << LL_ENDL; |
5458 | 5579 | ||
@@ -5644,6 +5765,18 @@ bool LLVoiceClient::inSpatialChannel(void) | |||
5644 | return result; | 5765 | return result; |
5645 | } | 5766 | } |
5646 | 5767 | ||
5768 | bool LLVoiceClient::inNonSpatialChannel(void) | ||
5769 | { | ||
5770 | bool result = false; | ||
5771 | |||
5772 | if(mAudioSession) | ||
5773 | result = !(mAudioSession->mIsSpatial); | ||
5774 | if(mNextAudioSession) | ||
5775 | result |= !(mNextAudioSession->mIsSpatial); | ||
5776 | |||
5777 | return result; | ||
5778 | } | ||
5779 | |||
5647 | std::string LLVoiceClient::getAudioSessionURI() | 5780 | std::string LLVoiceClient::getAudioSessionURI() |
5648 | { | 5781 | { |
5649 | std::string result; | 5782 | std::string result; |
@@ -6397,7 +6530,7 @@ LLVoiceClient::sessionState *LLVoiceClient::addSession(const std::string &uri, c | |||
6397 | { | 6530 | { |
6398 | // No existing session found. | 6531 | // No existing session found. |
6399 | 6532 | ||
6400 | LL_DEBUGS("Voice") << "adding new session: handle " << handle << " URI " << uri << LL_ENDL; | 6533 | LL_DEBUGS("VoiceSession") << "adding new session: handle " << handle << " URI " << uri << LL_ENDL; |
6401 | result = new sessionState(); | 6534 | result = new sessionState(); |
6402 | result->mSIPURI = uri; | 6535 | result->mSIPURI = uri; |
6403 | result->mHandle = handle; | 6536 | result->mHandle = handle; |
@@ -6416,7 +6549,7 @@ LLVoiceClient::sessionState *LLVoiceClient::addSession(const std::string &uri, c | |||
6416 | if(uri != result->mSIPURI) | 6549 | if(uri != result->mSIPURI) |
6417 | { | 6550 | { |
6418 | // TODO: Should this be an internal error? | 6551 | // TODO: Should this be an internal error? |
6419 | LL_DEBUGS("Voice") << "changing uri from " << result->mSIPURI << " to " << uri << LL_ENDL; | 6552 | LL_DEBUGS("VoiceSession") << "changing uri from " << result->mSIPURI << " to " << uri << LL_ENDL; |
6420 | setSessionURI(result, uri); | 6553 | setSessionURI(result, uri); |
6421 | } | 6554 | } |
6422 | 6555 | ||
@@ -6425,17 +6558,17 @@ LLVoiceClient::sessionState *LLVoiceClient::addSession(const std::string &uri, c | |||
6425 | if(handle.empty()) | 6558 | if(handle.empty()) |
6426 | { | 6559 | { |
6427 | // There's at least one race condition where where addSession was clearing an existing session handle, which caused things to break. | 6560 | // There's at least one race condition where where addSession was clearing an existing session handle, which caused things to break. |
6428 | LL_DEBUGS("Voice") << "NOT clearing handle " << result->mHandle << LL_ENDL; | 6561 | LL_DEBUGS("VoiceSession") << "NOT clearing handle " << result->mHandle << LL_ENDL; |
6429 | } | 6562 | } |
6430 | else | 6563 | else |
6431 | { | 6564 | { |
6432 | // TODO: Should this be an internal error? | 6565 | // TODO: Should this be an internal error? |
6433 | LL_DEBUGS("Voice") << "changing handle from " << result->mHandle << " to " << handle << LL_ENDL; | 6566 | LL_DEBUGS("VoiceSession") << "changing handle from " << result->mHandle << " to " << handle << LL_ENDL; |
6434 | setSessionHandle(result, handle); | 6567 | setSessionHandle(result, handle); |
6435 | } | 6568 | } |
6436 | } | 6569 | } |
6437 | 6570 | ||
6438 | LL_DEBUGS("Voice") << "returning existing session: handle " << handle << " URI " << uri << LL_ENDL; | 6571 | LL_DEBUGS("VoiceSession") << "returning existing session: handle " << handle << " URI " << uri << LL_ENDL; |
6439 | } | 6572 | } |
6440 | 6573 | ||
6441 | verifySessionState(); | 6574 | verifySessionState(); |
@@ -6455,14 +6588,14 @@ void LLVoiceClient::setSessionHandle(sessionState *session, const std::string &h | |||
6455 | { | 6588 | { |
6456 | if(iter->second != session) | 6589 | if(iter->second != session) |
6457 | { | 6590 | { |
6458 | LL_ERRS("Voice") << "Internal error: session mismatch!" << LL_ENDL; | 6591 | LL_ERRS("VoiceSession") << "Internal error: session mismatch!" << LL_ENDL; |
6459 | } | 6592 | } |
6460 | 6593 | ||
6461 | mSessionsByHandle.erase(iter); | 6594 | mSessionsByHandle.erase(iter); |
6462 | } | 6595 | } |
6463 | else | 6596 | else |
6464 | { | 6597 | { |
6465 | LL_ERRS("Voice") << "Internal error: session handle not found in map!" << LL_ENDL; | 6598 | LL_ERRS("VoiceSession") << "Internal error: session handle not found in map!" << LL_ENDL; |
6466 | } | 6599 | } |
6467 | } | 6600 | } |
6468 | 6601 | ||
@@ -6494,7 +6627,7 @@ void LLVoiceClient::deleteSession(sessionState *session) | |||
6494 | { | 6627 | { |
6495 | if(iter->second != session) | 6628 | if(iter->second != session) |
6496 | { | 6629 | { |
6497 | LL_ERRS("Voice") << "Internal error: session mismatch" << LL_ENDL; | 6630 | LL_ERRS("VoiceSession") << "Internal error: session mismatch" << LL_ENDL; |
6498 | } | 6631 | } |
6499 | mSessionsByHandle.erase(iter); | 6632 | mSessionsByHandle.erase(iter); |
6500 | } | 6633 | } |
@@ -6525,7 +6658,7 @@ void LLVoiceClient::deleteSession(sessionState *session) | |||
6525 | 6658 | ||
6526 | void LLVoiceClient::deleteAllSessions() | 6659 | void LLVoiceClient::deleteAllSessions() |
6527 | { | 6660 | { |
6528 | LL_DEBUGS("Voice") << "called" << LL_ENDL; | 6661 | LL_DEBUGS("VoiceSession") << "called" << LL_ENDL; |
6529 | 6662 | ||
6530 | while(!mSessions.empty()) | 6663 | while(!mSessions.empty()) |
6531 | { | 6664 | { |
@@ -6534,20 +6667,20 @@ void LLVoiceClient::deleteAllSessions() | |||
6534 | 6667 | ||
6535 | if(!mSessionsByHandle.empty()) | 6668 | if(!mSessionsByHandle.empty()) |
6536 | { | 6669 | { |
6537 | LL_ERRS("Voice") << "Internal error: empty session map, non-empty handle map" << LL_ENDL; | 6670 | LL_ERRS("VoiceSession") << "Internal error: empty session map, non-empty handle map" << LL_ENDL; |
6538 | } | 6671 | } |
6539 | } | 6672 | } |
6540 | 6673 | ||
6541 | void LLVoiceClient::verifySessionState(void) | 6674 | void LLVoiceClient::verifySessionState(void) |
6542 | { | 6675 | { |
6543 | // This is mostly intended for debugging problems with session state management. | 6676 | // This is mostly intended for debugging problems with session state management. |
6544 | LL_DEBUGS("Voice") << "Total session count: " << mSessions.size() << " , session handle map size: " << mSessionsByHandle.size() << LL_ENDL; | 6677 | LL_DEBUGS("VoiceSession") << "Total session count: " << mSessions.size() << " , session handle map size: " << mSessionsByHandle.size() << LL_ENDL; |
6545 | 6678 | ||
6546 | for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) | 6679 | for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) |
6547 | { | 6680 | { |
6548 | sessionState *session = *iter; | 6681 | sessionState *session = *iter; |
6549 | 6682 | ||
6550 | LL_DEBUGS("Voice") << "session " << session << ": handle " << session->mHandle << ", URI " << session->mSIPURI << LL_ENDL; | 6683 | LL_DEBUGS("VoiceSession") << "session " << session << ": handle " << session->mHandle << ", URI " << session->mSIPURI << LL_ENDL; |
6551 | 6684 | ||
6552 | if(!session->mHandle.empty()) | 6685 | if(!session->mHandle.empty()) |
6553 | { | 6686 | { |
@@ -6555,13 +6688,13 @@ void LLVoiceClient::verifySessionState(void) | |||
6555 | sessionMap::iterator i2 = mSessionsByHandle.find(&(session->mHandle)); | 6688 | sessionMap::iterator i2 = mSessionsByHandle.find(&(session->mHandle)); |
6556 | if(i2 == mSessionsByHandle.end()) | 6689 | if(i2 == mSessionsByHandle.end()) |
6557 | { | 6690 | { |
6558 | LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " not found in session map)" << LL_ENDL; | 6691 | LL_ERRS("VoiceSession") << "internal error (handle " << session->mHandle << " not found in session map)" << LL_ENDL; |
6559 | } | 6692 | } |
6560 | else | 6693 | else |
6561 | { | 6694 | { |
6562 | if(i2->second != session) | 6695 | if(i2->second != session) |
6563 | { | 6696 | { |
6564 | LL_ERRS("Voice") << "internal error (handle " << session->mHandle << " in session map points to another session)" << LL_ENDL; | 6697 | LL_ERRS("VoiceSession") << "internal error (handle " << session->mHandle << " in session map points to another session)" << LL_ENDL; |
6565 | } | 6698 | } |
6566 | } | 6699 | } |
6567 | } | 6700 | } |
@@ -6574,13 +6707,13 @@ void LLVoiceClient::verifySessionState(void) | |||
6574 | sessionIterator i2 = mSessions.find(session); | 6707 | sessionIterator i2 = mSessions.find(session); |
6575 | if(i2 == mSessions.end()) | 6708 | if(i2 == mSessions.end()) |
6576 | { | 6709 | { |
6577 | LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " not found in session map)" << LL_ENDL; | 6710 | LL_ERRS("VoiceSession") << "internal error (session for handle " << session->mHandle << " not found in session map)" << LL_ENDL; |
6578 | } | 6711 | } |
6579 | else | 6712 | else |
6580 | { | 6713 | { |
6581 | if(session->mHandle != (*i2)->mHandle) | 6714 | if(session->mHandle != (*i2)->mHandle) |
6582 | { | 6715 | { |
6583 | LL_ERRS("Voice") << "internal error (session for handle " << session->mHandle << " points to session with different handle " << (*i2)->mHandle << ")" << LL_ENDL; | 6716 | LL_ERRS("VoiceSession") << "internal error (session for handle " << session->mHandle << " points to session with different handle " << (*i2)->mHandle << ")" << LL_ENDL; |
6584 | } | 6717 | } |
6585 | } | 6718 | } |
6586 | } | 6719 | } |
@@ -7010,6 +7143,8 @@ class LLViewerParcelVoiceInfo : public LLHTTPNode | |||
7010 | { | 7143 | { |
7011 | LLSD body = input["body"]; | 7144 | LLSD body = input["body"]; |
7012 | 7145 | ||
7146 | LL_DEBUGS("VoiceCaps") << "ParcelVoiceInfo response: " | ||
7147 | << ll_pretty_print_sd(input) << LL_ENDL; | ||
7013 | //body has "region_name" (str), "parcel_local_id"(int), | 7148 | //body has "region_name" (str), "parcel_local_id"(int), |
7014 | //"voice_credentials" (map). | 7149 | //"voice_credentials" (map). |
7015 | 7150 | ||
@@ -7036,7 +7171,10 @@ class LLViewerParcelVoiceInfo : public LLHTTPNode | |||
7036 | voice_credentials["channel_credentials"].asString(); | 7171 | voice_credentials["channel_credentials"].asString(); |
7037 | } | 7172 | } |
7038 | 7173 | ||
7039 | gVoiceClient->setSpatialChannel(uri, credentials); | 7174 | LLUUID response_id; |
7175 | response_id.generate(); | ||
7176 | gVoiceClient->setPIRCapResponseID(response_id); | ||
7177 | gVoiceClient->setSpatialChannel(uri, credentials, response_id); | ||
7040 | } | 7178 | } |
7041 | } | 7179 | } |
7042 | } | 7180 | } |
@@ -7050,10 +7188,13 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode | |||
7050 | const LLSD& context, | 7188 | const LLSD& context, |
7051 | const LLSD& input) const | 7189 | const LLSD& input) const |
7052 | { | 7190 | { |
7191 | |||
7053 | //You received this messsage (most likely on region cross or | 7192 | //You received this messsage (most likely on region cross or |
7054 | //teleport) | 7193 | //teleport) |
7055 | if ( input.has("body") && input["body"].has("major_version") ) | 7194 | if ( input.has("body") && input["body"].has("major_version") ) |
7056 | { | 7195 | { |
7196 | LL_DEBUGS("VoiceCaps") << "RequiredVoiceVersion response: " | ||
7197 | << ll_pretty_print_sd(input)<< LL_ENDL; | ||
7057 | int major_voice_version = | 7198 | int major_voice_version = |
7058 | input["body"]["major_version"].asInteger(); | 7199 | input["body"]["major_version"].asInteger(); |
7059 | // int minor_voice_version = | 7200 | // int minor_voice_version = |
diff --git a/linden/indra/newview/llvoiceclient.h b/linden/indra/newview/llvoiceclient.h index 9ef3be9..fb59b4e 100644 --- a/linden/indra/newview/llvoiceclient.h +++ b/linden/indra/newview/llvoiceclient.h | |||
@@ -424,11 +424,15 @@ static void updatePosition(void); | |||
424 | const std::string& account_name, | 424 | const std::string& account_name, |
425 | const std::string& password, | 425 | const std::string& password, |
426 | const std::string& voice_sip_uri_hostname, | 426 | const std::string& voice_sip_uri_hostname, |
427 | const std::string& voice_account_server_uri); | 427 | const std::string& voice_account_server_uri, |
428 | const LLUUID& response_id); | ||
429 | |||
428 | void loginSendMessage(); | 430 | void loginSendMessage(); |
429 | void logout(); | 431 | void logout(); |
430 | void logoutSendMessage(); | 432 | void logoutSendMessage(); |
431 | 433 | ||
434 | void loadDaemon(const std::string& scheme); | ||
435 | |||
432 | void accountListBlockRulesSendMessage(); | 436 | void accountListBlockRulesSendMessage(); |
433 | void accountListAutoAcceptRulesSendMessage(); | 437 | void accountListAutoAcceptRulesSendMessage(); |
434 | 438 | ||
@@ -474,7 +478,8 @@ static void updatePosition(void); | |||
474 | const std::string &credentials); | 478 | const std::string &credentials); |
475 | void setSpatialChannel( | 479 | void setSpatialChannel( |
476 | const std::string &uri, | 480 | const std::string &uri, |
477 | const std::string &credentials); | 481 | const std::string &credentials, |
482 | const LLUUID& response_id); | ||
478 | // start a voice session with the specified user | 483 | // start a voice session with the specified user |
479 | void callUser(const LLUUID &uuid); | 484 | void callUser(const LLUUID &uuid); |
480 | 485 | ||
@@ -519,7 +524,7 @@ static void updatePosition(void); | |||
519 | 524 | ||
520 | void close(); | 525 | void close(); |
521 | void start(); | 526 | void start(); |
522 | 527 | void setPIRCapResponseID(const LLUUID& response_id){ mPIRCapResponseID = response_id; } | |
523 | private: | 528 | private: |
524 | 529 | ||
525 | // internal state for a simple state machine. This is used to deal with the asynchronous nature of some of the messages. | 530 | // internal state for a simple state machine. This is used to deal with the asynchronous nature of some of the messages. |
@@ -595,7 +600,13 @@ static void updatePosition(void); | |||
595 | std::string mAccountDisplayName; | 600 | std::string mAccountDisplayName; |
596 | std::string mAccountFirstName; | 601 | std::string mAccountFirstName; |
597 | std::string mAccountLastName; | 602 | std::string mAccountLastName; |
598 | 603 | ||
604 | bool mAccountActive; | ||
605 | bool mVAPRequested; | ||
606 | std::string mDaemonScheme; | ||
607 | LLUUID mVAPCapResponseID; | ||
608 | LLUUID mPIRCapResponseID; | ||
609 | |||
599 | bool mTuningMode; | 610 | bool mTuningMode; |
600 | float mTuningEnergy; | 611 | float mTuningEnergy; |
601 | std::string mTuningAudioFile; | 612 | std::string mTuningAudioFile; |
@@ -667,6 +678,7 @@ static std::string displayNameFromAvatar(LLVOAvatar *avatar); | |||
667 | static std::string nameFromsipURI(const std::string &uri); | 678 | static std::string nameFromsipURI(const std::string &uri); |
668 | 679 | ||
669 | bool inSpatialChannel(void); | 680 | bool inSpatialChannel(void); |
681 | bool inNonSpatialChannel(void); | ||
670 | std::string getAudioSessionURI(); | 682 | std::string getAudioSessionURI(); |
671 | std::string getAudioSessionHandle(); | 683 | std::string getAudioSessionHandle(); |
672 | 684 | ||
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 4a53d4e..8d5bfb4 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp | |||
@@ -93,7 +93,6 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re | |||
93 | mRelativeXformInvTrans.setIdentity(); | 93 | mRelativeXformInvTrans.setIdentity(); |
94 | 94 | ||
95 | mLOD = MIN_LOD; | 95 | mLOD = MIN_LOD; |
96 | mSculptLevel = -2; | ||
97 | mTextureAnimp = NULL; | 96 | mTextureAnimp = NULL; |
98 | mVObjRadius = LLVector3(1,1,0.5f).length(); | 97 | mVObjRadius = LLVector3(1,1,0.5f).length(); |
99 | mNumFaces = 0; | 98 | mNumFaces = 0; |
@@ -507,9 +506,8 @@ void LLVOVolume::updateTextureVirtualSize() | |||
507 | 506 | ||
508 | if (isSculpted()) | 507 | if (isSculpted()) |
509 | { | 508 | { |
510 | LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); | 509 | updateSculptTexture(); |
511 | LLUUID id = sculpt_params->getSculptTexture(); | 510 | |
512 | mSculptTexture = gImageList.getImage(id); | ||
513 | if (mSculptTexture.notNull()) | 511 | if (mSculptTexture.notNull()) |
514 | { | 512 | { |
515 | mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(), | 513 | mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(), |
@@ -532,14 +530,14 @@ void LLVOVolume::updateTextureVirtualSize() | |||
532 | } | 530 | } |
533 | } | 531 | } |
534 | 532 | ||
535 | S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture | 533 | S32 texture_discard = mSculptTexture->getDiscardLevel(); //try to match the texture |
536 | S32 current_discard = mSculptLevel; | 534 | S32 current_discard = getVolume() ? getVolume()->getSculptLevel() : -2; |
537 | 535 | ||
538 | if (texture_discard >= 0 && //texture has some data available | 536 | if (texture_discard >= 0 && //texture has some data available |
539 | (texture_discard < current_discard || //texture has more data than last rebuild | 537 | (texture_discard < current_discard || //texture has more data than last rebuild |
540 | current_discard < 0)) //no previous rebuild | 538 | current_discard < 0)) //no previous rebuild |
541 | { | 539 | { |
542 | markForUpdate(FALSE); | 540 | gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); |
543 | mSculptChanged = TRUE; | 541 | mSculptChanged = TRUE; |
544 | } | 542 | } |
545 | 543 | ||
@@ -687,19 +685,17 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail | |||
687 | mVolumeImpl->onSetVolume(volume_params, detail); | 685 | mVolumeImpl->onSetVolume(volume_params, detail); |
688 | } | 686 | } |
689 | 687 | ||
688 | updateSculptTexture(); | ||
690 | if (isSculpted()) | 689 | if (isSculpted()) |
691 | { | 690 | { |
692 | mSculptTexture = gImageList.getImage(volume_params.getSculptID()); | ||
693 | if (mSculptTexture.notNull()) | 691 | if (mSculptTexture.notNull()) |
694 | { | 692 | { |
695 | sculpt(); | 693 | sculpt(); |
696 | mSculptLevel = getVolume()->getSculptLevel(); | ||
697 | mSculptSurfaceArea = getVolume()->sculptGetSurfaceArea(); | 694 | mSculptSurfaceArea = getVolume()->sculptGetSurfaceArea(); |
698 | } | 695 | } |
699 | } | 696 | } |
700 | else | 697 | else |
701 | { | 698 | { |
702 | mSculptTexture = NULL; | ||
703 | mSculptSurfaceArea = 0.0; | 699 | mSculptSurfaceArea = 0.0; |
704 | } | 700 | } |
705 | 701 | ||
@@ -708,6 +704,38 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail | |||
708 | return FALSE; | 704 | return FALSE; |
709 | } | 705 | } |
710 | 706 | ||
707 | |||
708 | void LLVOVolume::updateSculptTexture() | ||
709 | { | ||
710 | LLPointer<LLViewerImage> old_sculpt = mSculptTexture; | ||
711 | if (isSculpted()) | ||
712 | { | ||
713 | LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); | ||
714 | LLUUID id = sculpt_params->getSculptTexture(); | ||
715 | if (id.notNull()) | ||
716 | { | ||
717 | mSculptTexture = gImageList.getImage(id); | ||
718 | } | ||
719 | } | ||
720 | else | ||
721 | { | ||
722 | mSculptTexture = NULL; | ||
723 | } | ||
724 | |||
725 | if (mSculptTexture != old_sculpt) | ||
726 | { | ||
727 | if (old_sculpt.notNull()) | ||
728 | { | ||
729 | old_sculpt->removeVolume(this); | ||
730 | } | ||
731 | if (mSculptTexture.notNull()) | ||
732 | { | ||
733 | mSculptTexture->addVolume(this); | ||
734 | } | ||
735 | } | ||
736 | } | ||
737 | |||
738 | |||
711 | // sculpt replaces generate() for sculpted surfaces | 739 | // sculpt replaces generate() for sculpted surfaces |
712 | void LLVOVolume::sculpt() | 740 | void LLVOVolume::sculpt() |
713 | { | 741 | { |
@@ -718,7 +746,7 @@ void LLVOVolume::sculpt() | |||
718 | S8 sculpt_components = 0; | 746 | S8 sculpt_components = 0; |
719 | const U8* sculpt_data = NULL; | 747 | const U8* sculpt_data = NULL; |
720 | 748 | ||
721 | S32 discard_level = mSculptTexture->getCachedRawImageLevel() ; | 749 | S32 discard_level = mSculptTexture->getDiscardLevel() ; |
722 | LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ; | 750 | LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ; |
723 | 751 | ||
724 | S32 max_discard = mSculptTexture->getMaxDiscardLevel(); | 752 | S32 max_discard = mSculptTexture->getMaxDiscardLevel(); |
@@ -762,7 +790,7 @@ void LLVOVolume::sculpt() | |||
762 | } | 790 | } |
763 | getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); | 791 | getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); |
764 | 792 | ||
765 | /*//notify rebuild any other VOVolumes that reference this sculpty volume | 793 | //notify rebuild any other VOVolumes that reference this sculpty volume |
766 | for (S32 i = 0; i < mSculptTexture->getNumVolumes(); ++i) | 794 | for (S32 i = 0; i < mSculptTexture->getNumVolumes(); ++i) |
767 | { | 795 | { |
768 | LLVOVolume* volume = (*(mSculptTexture->getVolumeList()))[i]; | 796 | LLVOVolume* volume = (*(mSculptTexture->getVolumeList()))[i]; |
@@ -770,7 +798,7 @@ void LLVOVolume::sculpt() | |||
770 | { | 798 | { |
771 | gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY, FALSE); | 799 | gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY, FALSE); |
772 | } | 800 | } |
773 | }*/ | 801 | } |
774 | } | 802 | } |
775 | } | 803 | } |
776 | 804 | ||
diff --git a/linden/indra/newview/llvovolume.h b/linden/indra/newview/llvovolume.h index 7fba28c..2da1d7a 100644 --- a/linden/indra/newview/llvovolume.h +++ b/linden/indra/newview/llvovolume.h | |||
@@ -171,6 +171,7 @@ public: | |||
171 | void setTexture(const S32 face); | 171 | void setTexture(const S32 face); |
172 | S32 getIndexInTex() const {return mIndexInTex ;} | 172 | S32 getIndexInTex() const {return mIndexInTex ;} |
173 | /*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false); | 173 | /*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false); |
174 | void updateSculptTexture(); | ||
174 | void setIndexInTex(S32 index) { mIndexInTex = index ;} | 175 | void setIndexInTex(S32 index) { mIndexInTex = index ;} |
175 | void sculpt(); | 176 | void sculpt(); |
176 | void updateRelativeXform(); | 177 | void updateRelativeXform(); |
@@ -232,7 +233,6 @@ private: | |||
232 | LLFrameTimer mTextureUpdateTimer; | 233 | LLFrameTimer mTextureUpdateTimer; |
233 | S32 mLOD; | 234 | S32 mLOD; |
234 | BOOL mLODChanged; | 235 | BOOL mLODChanged; |
235 | S32 mSculptLevel; | ||
236 | BOOL mSculptChanged; | 236 | BOOL mSculptChanged; |
237 | LLMatrix4 mRelativeXform; | 237 | LLMatrix4 mRelativeXform; |
238 | LLMatrix3 mRelativeXformInvTrans; | 238 | LLMatrix3 mRelativeXformInvTrans; |
@@ -240,7 +240,7 @@ private: | |||
240 | F32 mVObjRadius; | 240 | F32 mVObjRadius; |
241 | LLVolumeInterface *mVolumeImpl; | 241 | LLVolumeInterface *mVolumeImpl; |
242 | LLPointer<LLViewerImage> mSculptTexture; | 242 | LLPointer<LLViewerImage> mSculptTexture; |
243 | S32 mIndexInTex; | 243 | S32 mIndexInTex; // index of this volume in the texture's volume list |
244 | 244 | ||
245 | // statics | 245 | // statics |
246 | public: | 246 | public: |
diff --git a/linden/indra/newview/primbackup.cpp b/linden/indra/newview/primbackup.cpp index 7f050a0..613000a 100644 --- a/linden/indra/newview/primbackup.cpp +++ b/linden/indra/newview/primbackup.cpp | |||
@@ -625,6 +625,8 @@ void primbackup::export_next_texture() | |||
625 | 625 | ||
626 | void primbackup::import_object(bool upload) | 626 | void primbackup::import_object(bool upload) |
627 | { | 627 | { |
628 | |||
629 | |||
628 | textures.clear(); | 630 | textures.clear(); |
629 | assetmap.clear(); | 631 | assetmap.clear(); |
630 | current_asset=LLUUID::null; | 632 | current_asset=LLUUID::null; |
@@ -641,9 +643,21 @@ void primbackup::import_object(bool upload) | |||
641 | std::string file_name = file_picker.getFirstFile().c_str(); | 643 | std::string file_name = file_picker.getFirstFile().c_str(); |
642 | folder = gDirUtilp->getDirName(file_name); | 644 | folder = gDirUtilp->getDirName(file_name); |
643 | 645 | ||
644 | llifstream import_file(file_name); | 646 | { |
645 | LLSDSerialize::fromXML(llsd, import_file); | 647 | LLSD import_llsd; |
646 | import_file.close(); | 648 | llifstream import_file(file_name); |
649 | S32 status; | ||
650 | status = LLSDSerialize::fromXML(import_llsd, import_file); | ||
651 | import_file.close(); | ||
652 | |||
653 | if (LLSDParser::PARSE_FAILURE == status) | ||
654 | { | ||
655 | llwarns << "invalid xml file." << llendl; | ||
656 | return; | ||
657 | } | ||
658 | |||
659 | llsd = import_llsd; | ||
660 | } | ||
647 | 661 | ||
648 | show(); | 662 | show(); |
649 | 663 | ||
diff --git a/linden/indra/newview/res/viewerRes.rc b/linden/indra/newview/res/viewerRes.rc index cbfbd28..db55c4c 100644 --- a/linden/indra/newview/res/viewerRes.rc +++ b/linden/indra/newview/res/viewerRes.rc | |||
@@ -138,8 +138,8 @@ TOOLMEDIAOPEN CURSOR "toolmediaopen.cur" | |||
138 | // | 138 | // |
139 | 139 | ||
140 | VS_VERSION_INFO VERSIONINFO | 140 | VS_VERSION_INFO VERSIONINFO |
141 | FILEVERSION 1,3,0 | 141 | FILEVERSION 1,4,0 |
142 | PRODUCTVERSION 1,3,0 | 142 | PRODUCTVERSION 1,4,0 |
143 | FILEFLAGSMASK 0x3fL | 143 | FILEFLAGSMASK 0x3fL |
144 | #ifdef _DEBUG | 144 | #ifdef _DEBUG |
145 | FILEFLAGS 0x1L | 145 | FILEFLAGS 0x1L |
@@ -155,12 +155,12 @@ BEGIN | |||
155 | BLOCK "040904b0" | 155 | BLOCK "040904b0" |
156 | BEGIN | 156 | BEGIN |
157 | VALUE "CompanyName", "Imprudence Viewer Project" | 157 | VALUE "CompanyName", "Imprudence Viewer Project" |
158 | VALUE "FileDescription", "Imprudence Experimental" | 158 | VALUE "FileDescription", "Imprudence" |
159 | VALUE "FileVersion", "2011.04.02" | 159 | VALUE "FileVersion", "1.4.0 beta 1" |
160 | VALUE "InternalName", "Imprudence Experimental" | 160 | VALUE "InternalName", "Imprudence" |
161 | VALUE "OriginalFilename", "Imprudence.exe" | 161 | VALUE "OriginalFilename", "Imprudence.exe" |
162 | VALUE "ProductName", "Imprudence Experimental" | 162 | VALUE "ProductName", "Imprudence" |
163 | VALUE "ProductVersion", "2011.04.02" | 163 | VALUE "ProductVersion", "1.4.0 beta 1" |
164 | END | 164 | END |
165 | END | 165 | END |
166 | BLOCK "VarFileInfo" | 166 | BLOCK "VarFileInfo" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_busy.xml b/linden/indra/newview/skins/default/xui/en-us/floater_busy.xml index 9f55f67..50ec87c 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_busy.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_busy.xml | |||
@@ -93,4 +93,4 @@ | |||
93 | <button bottom_delta="0" follows="top|right" height="22" label="OK" | 93 | <button bottom_delta="0" follows="top|right" height="22" label="OK" |
94 | right="-85" name="btn_ok" tool_tip="" enabled="true" width="80" /> | 94 | right="-85" name="btn_ok" tool_tip="" enabled="true" width="80" /> |
95 | 95 | ||
96 | </floater> \ No newline at end of file | 96 | </floater> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml b/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml index 157588d..51ba35f 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml | |||
@@ -17,4 +17,4 @@ | |||
17 | right="-5" name="btn_cancel" width="85" /> | 17 | right="-5" name="btn_cancel" width="85" /> |
18 | <button bottom_delta="0" follows="bottom|right" height="20" label="OK" | 18 | <button bottom_delta="0" follows="bottom|right" height="20" label="OK" |
19 | left_delta="-90" name="btn_ok" width="85" /> | 19 | left_delta="-90" name="btn_ok" width="85" /> |
20 | </floater> \ No newline at end of file | 20 | </floater> |
diff --git a/linden/install.xml b/linden/install.xml index 7ff8dc0..90d0ae5 100755 --- a/linden/install.xml +++ b/linden/install.xml | |||
@@ -1151,9 +1151,9 @@ Copyright (C) 2004-2005 Vladimir Berezniker @ http://public.xdi.org/=vmpn | |||
1151 | <key>ogg-vorbis</key> | 1151 | <key>ogg-vorbis</key> |
1152 | <map> | 1152 | <map> |
1153 | <key>copyright</key> | 1153 | <key>copyright</key> |
1154 | <string>Copyright (C) 2008 Xiph.org Foundation</string> | 1154 | <string>Copyright (C) Xiph.org Foundation</string> |
1155 | <key>description</key> | 1155 | <key>description</key> |
1156 | <string>Ogg: container format Vorbis: audio compression scheme</string> | 1156 | <string>Ogg: container format; Vorbis: audio compression scheme</string> |
1157 | <key>license</key> | 1157 | <key>license</key> |
1158 | <string>xiph-bsd</string> | 1158 | <string>xiph-bsd</string> |
1159 | <key>packages</key> | 1159 | <key>packages</key> |
@@ -1161,30 +1161,30 @@ Copyright (C) 2004-2005 Vladimir Berezniker @ http://public.xdi.org/=vmpn | |||
1161 | <key>darwin</key> | 1161 | <key>darwin</key> |
1162 | <map> | 1162 | <map> |
1163 | <key>md5sum</key> | 1163 | <key>md5sum</key> |
1164 | <string>88eec3965fc2384436192faef1db2629</string> | 1164 | <string>30c75ce29c2ce2f6e8063067db31989d</string> |
1165 | <key>url</key> | 1165 | <key>url</key> |
1166 | <uri>http://imprudenceviewer.org/download/libs/ogg-vorbis-darwin-20100620.tar.bz2</uri> | 1166 | <uri>http://download.kokuaviewer.org/files/libs/ogg-vorbis-darwin-1.2.2-1.3.2-20110517.tar.bz2</uri> |
1167 | </map> | 1167 | </map> |
1168 | <key>linux</key> | 1168 | <key>linux</key> |
1169 | <map> | 1169 | <map> |
1170 | <key>md5sum</key> | 1170 | <key>md5sum</key> |
1171 | <string>72bde567859934024c8a4a70b97b24f5</string> | 1171 | <string>a132634c28f0d7fb0e7e4f62c82a0579</string> |
1172 | <key>url</key> | 1172 | <key>url</key> |
1173 | <uri>http://imprudenceviewer.org/download/libs/ogg-vorbis-linux-20091115.tar.bz2</uri> | 1173 | <uri>http://download.kokuaviewer.org/files/libs/ogg-vorbis-linux-1.2.2-1.3.2-20110514.tar.bz2</uri> |
1174 | </map> | 1174 | </map> |
1175 | <key>linux64</key> | 1175 | <key>linux64</key> |
1176 | <map> | 1176 | <map> |
1177 | <key>md5sum</key> | 1177 | <key>md5sum</key> |
1178 | <string>83c72b57a95e8c42560fb67955169f19</string> | 1178 | <string>dded849d4d46fb5d94f088c86407ec98</string> |
1179 | <key>url</key> | 1179 | <key>url</key> |
1180 | <uri>http://imprudenceviewer.org/download/libs/ogg-vorbis-linux64-20091202.tar.bz2</uri> | 1180 | <uri>http://download.kokuaviewer.org/files/libs/ogg-vorbis-linux64-1.2.2-1.3.2-20110514.tar.bz2</uri> |
1181 | </map> | 1181 | </map> |
1182 | <key>windows</key> | 1182 | <key>windows</key> |
1183 | <map> | 1183 | <map> |
1184 | <key>md5sum</key> | 1184 | <key>md5sum</key> |
1185 | <string>9bf1fea65e66b2cd3075e6ffd7eb57ad</string> | 1185 | <string>946bab72f6774220eaf139ce378ba671</string> |
1186 | <key>url</key> | 1186 | <key>url</key> |
1187 | <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/ogg-vorbis-1.1.3-1.2.0-windows-20080723.tar.bz2</uri> | 1187 | <uri>http://download.kokuaviewer.org/files/libs/ogg-vorbis-windows-1.2.2-1.3.2-20110511.tar.bz2</uri> |
1188 | </map> | 1188 | </map> |
1189 | </map> | 1189 | </map> |
1190 | </map> | 1190 | </map> |