diff options
| author | Graham Linden <graham@lindenlab.com> | 2018-08-22 00:56:27 +0100 | 
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2018-08-22 00:56:27 +0100 | 
| commit | a27501d21626e0026a184aaf9bc24a22d0f636bb (patch) | |
| tree | c4e205489126a3d8cc8aa5ffd97fd80e82e6131c | |
| parent | ab1c7087e944ea9ded217770176e3444c8c39c0d (diff) | |
| parent | 93342e3201cfd83b4cda0a194e900999d3753f46 (diff) | |
Merge 5.1.9
| -rwxr-xr-x | .hgtags | 1 | ||||
| -rw-r--r-- | autobuild.xml | 22 | ||||
| -rwxr-xr-x | build.sh | 1 | ||||
| -rw-r--r-- | indra/edit-me-to-trigger-new-build.txt | 1 | ||||
| -rw-r--r-- | indra/llinventory/llsettingsbase.cpp | 14 | ||||
| -rw-r--r-- | indra/llinventory/llsettingsbase.h | 1 | ||||
| -rw-r--r-- | indra/llinventory/llsettingssky.cpp | 29 | ||||
| -rw-r--r-- | indra/llinventory/llsettingssky.h | 8 | ||||
| -rw-r--r-- | indra/newview/VIEWER_VERSION.txt | 2 | ||||
| -rw-r--r-- | indra/newview/llenvironment.cpp | 28 | ||||
| -rw-r--r-- | indra/newview/llfloaterland.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llpaneleditsky.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/llpaneleditsky.h | 2 | ||||
| -rw-r--r-- | indra/newview/llpanelenvironment.cpp | 32 | ||||
| -rw-r--r-- | indra/newview/llpanelenvironment.h | 3 | ||||
| -rw-r--r-- | indra/newview/llpanelvoicedevicesettings.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/llvoiceclient.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llvoiceclient.h | 15 | ||||
| -rw-r--r-- | indra/newview/llvoicevivox.cpp | 273 | ||||
| -rw-r--r-- | indra/newview/llvoicevivox.h | 4 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_region_environment.xml | 24 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml | 130 | 
22 files changed, 456 insertions, 177 deletions
@@ -539,3 +539,4 @@ ad0e15543836d64d6399d28b32852510435e344a 5.1.0-release  2ea47f358b171178eb9a95503a1670d519c2886f 5.1.5-release  04538b8157c1f5cdacd9403f0a395452d4a93689 5.1.6-release  ac3b1332ad4f55b7182a8cbcc1254535a0069f75 5.1.7-release +23ea0fe36fadf009a60c080392ce80e4bf8af8d9 5.1.8-release diff --git a/autobuild.xml b/autobuild.xml index 1e3d3b34c3..1c328ddb3e 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3098,9 +3098,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>              <key>archive</key>              <map>                <key>hash</key> -              <string>b1b0134bc55f55a7c1a04ee78d70c64d</string> +              <string>a605ec940768c878527d3b8f2ff61288</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12438/73598/slvoice-4.9.0002.27586.511884-darwin64-511884.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/21421/157284/slvoice-4.9.0002.30313.517593-darwin64-517593.tar.bz2</string>              </map>              <key>name</key>              <string>darwin64</string> @@ -3134,9 +3134,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>              <key>archive</key>              <map>                <key>hash</key> -              <string>ec50c31efce74bdedee470b5388aeeec</string> +              <string>5a78539626b5f23522d0b466247f48b4</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12434/73576/slvoice-4.9.0002.27586.511884-windows-511884.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/21422/157291/slvoice-4.9.0002.30313.517593-windows-517593.tar.bz2</string>              </map>              <key>name</key>              <string>windows</string> @@ -3146,16 +3146,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>              <key>archive</key>              <map>                <key>hash</key> -              <string>4bf45d641bf5b2bd6b2cc39edcb01a6e</string> +              <string>1f8e09c053c00d9dc44ea74568e63dc1</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12433/73570/slvoice-4.9.0002.27586.511884-windows64-511884.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/21423/157298/slvoice-4.9.0002.30313.517593-windows64-517593.tar.bz2</string>              </map>              <key>name</key>              <string>windows64</string>            </map>          </map>          <key>version</key> -        <string>4.9.0002.27586.511884</string> +        <string>4.9.0002.30313.517593</string>        </map>        <key>tut</key>        <map> @@ -3730,10 +3730,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>                <map>                  <key>command</key>                  <string>xcodebuild</string> -                <key>filters</key> -                <array> -                  <string>setenv</string> -                </array>                  <key>options</key>                  <array>                    <string>-configuration</string> @@ -3790,10 +3786,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>                <map>                  <key>command</key>                  <string>xcodebuild</string> -                <key>filters</key> -                <array> -                  <string>setenv</string> -                </array>                  <key>options</key>                  <array>                    <string>-configuration</string> @@ -114,7 +114,6 @@ pre_build()       -DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \       -DVIEWER_CHANNEL:STRING="${viewer_channel}" \       -DGRID:STRING="\"$viewer_grid\"" \ -     -DLL_TESTS:BOOL="$run_tests" \       -DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url \       "${SIGNING[@]}" \      || fatal "$variant configuration failed" diff --git a/indra/edit-me-to-trigger-new-build.txt b/indra/edit-me-to-trigger-new-build.txt index 139597f9cb..b28b04f643 100644 --- a/indra/edit-me-to-trigger-new-build.txt +++ b/indra/edit-me-to-trigger-new-build.txt @@ -1,2 +1,3 @@ + diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index e00dd2199c..938f614fc9 100644 --- a/indra/llinventory/llsettingsbase.cpp +++ b/indra/llinventory/llsettingsbase.cpp @@ -306,7 +306,7 @@ bool LLSettingsBase::validate()  LLSD LLSettingsBase::settingValidation(LLSD &settings, validation_list_t &validations)  { -    static Validator  validateName(SETTING_NAME, false, LLSD::TypeString); +    static Validator  validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, 32));      static Validator  validateId(SETTING_ID, false, LLSD::TypeUUID);      static Validator  validateHash(SETTING_HASH, false, LLSD::TypeInteger);      static Validator  validateType(SETTING_TYPE, false, LLSD::TypeString); @@ -564,6 +564,18 @@ bool LLSettingsBase::Validator::verifyIntegerRange(LLSD &value, LLSD range)      return true;  } +bool LLSettingsBase::Validator::verifyStringLength(LLSD &value, S32 length) +{ +    std::string sval = value.asString(); + +    if (!sval.empty()) +    { +        sval = sval.substr(0, length); +        value = LLSD::String(sval); +    } +    return true; +} +  //=========================================================================  void LLSettingsBlender::update(const LLSettingsBase::BlendFactor& blendf)  { diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index 9757092794..7884240ae3 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -230,6 +230,7 @@ public:          static bool verifyQuaternionNormal(LLSD &value);          static bool verifyFloatRange(LLSD &value, LLSD range);          static bool verifyIntegerRange(LLSD &value, LLSD range); +        static bool verifyStringLength(LLSD &value, S32 length);      private:          std::string mName; diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 3ede670d35..cfd15814ed 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -93,10 +93,12 @@ const std::string LLSettingsSky::SETTING_GLOW("glow");  const std::string LLSettingsSky::SETTING_LIGHT_NORMAL("lightnorm");  const std::string LLSettingsSky::SETTING_MAX_Y("max_y");  const std::string LLSettingsSky::SETTING_MOON_ROTATION("moon_rotation"); +const std::string LLSettingsSky::SETTING_MOON_SCALE("moon_scale");  const std::string LLSettingsSky::SETTING_MOON_TEXTUREID("moon_id");  const std::string LLSettingsSky::SETTING_STAR_BRIGHTNESS("star_brightness");  const std::string LLSettingsSky::SETTING_SUNLIGHT_COLOR("sunlight_color");  const std::string LLSettingsSky::SETTING_SUN_ROTATION("sun_rotation"); +const std::string LLSettingsSky::SETTING_SUN_SCALE("sun_scale");  const std::string LLSettingsSky::SETTING_SUN_TEXTUREID("sun_id");  const std::string LLSettingsSky::SETTING_LEGACY_EAST_ANGLE("east_angle"); @@ -524,6 +526,8 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()          validation.push_back(Validator(SETTING_MAX_Y,               true,  LLSD::TypeReal,                boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(4000.0f)))));          validation.push_back(Validator(SETTING_MOON_ROTATION,       true,  LLSD::TypeArray, &Validator::verifyQuaternionNormal)); +        validation.push_back(Validator(SETTING_MOON_SCALE,          false, LLSD::TypeReal, +                boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));          validation.push_back(Validator(SETTING_MOON_TEXTUREID,      false, LLSD::TypeUUID));          validation.push_back(Validator(SETTING_STAR_BRIGHTNESS,     true,  LLSD::TypeReal,               boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f))))); @@ -532,7 +536,9 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()                  LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),                  LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));          validation.push_back(Validator(SETTING_SUN_ROTATION,        true,  LLSD::TypeArray, &Validator::verifyQuaternionNormal)); -        validation.push_back(Validator(SETTING_SUN_TEXTUREID,      false, LLSD::TypeUUID)); +        validation.push_back(Validator(SETTING_SUN_SCALE,           false, LLSD::TypeReal, +            boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0))); +        validation.push_back(Validator(SETTING_SUN_TEXTUREID, false, LLSD::TypeUUID));          validation.push_back(Validator(SETTING_PLANET_RADIUS,       true,  LLSD::TypeReal,                boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(32768.0f))))); @@ -1334,6 +1340,16 @@ void LLSettingsSky::setMoonRotation(const LLQuaternion &val)      setValue(SETTING_MOON_ROTATION, val);  } +F32 LLSettingsSky::getMoonScale() const +{ +    return mSettings[SETTING_MOON_SCALE].asReal(); +} + +void LLSettingsSky::setMoonScale(F32 val) +{ +    setValue(SETTING_MOON_SCALE, val); +} +  LLUUID LLSettingsSky::getMoonTextureId() const  {      return mSettings[SETTING_MOON_TEXTUREID].asUUID(); @@ -1374,6 +1390,17 @@ void LLSettingsSky::setSunRotation(const LLQuaternion &val)      setValue(SETTING_SUN_ROTATION, val);  } + +F32 LLSettingsSky::getSunScale() const +{ +    return mSettings[SETTING_SUN_SCALE].asReal(); +} + +void LLSettingsSky::setSunScale(F32 val) +{ +    setValue(SETTING_SUN_SCALE, val); +} +  LLUUID LLSettingsSky::getSunTextureId() const  {      return mSettings[SETTING_SUN_TEXTUREID].asUUID(); diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index d15e084878..8030bfeb39 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -62,10 +62,12 @@ public:      static const std::string SETTING_LIGHT_NORMAL;      static const std::string SETTING_MAX_Y;      static const std::string SETTING_MOON_ROTATION; +    static const std::string SETTING_MOON_SCALE;      static const std::string SETTING_MOON_TEXTUREID;      static const std::string SETTING_STAR_BRIGHTNESS;      static const std::string SETTING_SUNLIGHT_COLOR;      static const std::string SETTING_SUN_ROTATION; +    static const std::string SETTING_SUN_SCALE;      static const std::string SETTING_SUN_TEXTUREID;      static const std::string SETTING_PLANET_RADIUS; @@ -169,6 +171,9 @@ public:      LLQuaternion getMoonRotation() const;      void setMoonRotation(const LLQuaternion &val); +    F32 getMoonScale() const; +    void setMoonScale(F32 val); +      LLUUID getMoonTextureId() const;      void setMoonTextureId(LLUUID id); @@ -181,6 +186,9 @@ public:      LLQuaternion getSunRotation() const;      void setSunRotation(const LLQuaternion &val) ; +    F32 getSunScale() const; +    void setSunScale(F32 val); +      LLUUID getSunTextureId() const;      void setSunTextureId(LLUUID id); diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index d4bda08b51..fc3aa7739a 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -5.1.8 +5.1.9 diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index be0c763e25..8f703d0035 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1037,22 +1037,26 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb)  {      if (!isExtendedEnvironmentEnabled())      {   /*TODO: When EEP is live on the entire grid, this can go away. */ -        if (!cb) +        if (parcel_id == INVALID_PARCEL_ID)          { -            cb = [this](S32 pid, EnvironmentInfo::ptr_t envinfo)  -            {  -                if (envinfo->mDayCycle) recordEnvironment(pid, envinfo);  -                else +            if (!cb) +            { +                cb = [this](S32 pid, EnvironmentInfo::ptr_t envinfo)                  { -                    clearEnvironment(ENV_PARCEL); -                    setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET); -                    updateEnvironment(); -                } -            }; -        } +                    if (envinfo->mDayCycle) recordEnvironment(pid, envinfo); +                    else +                    { +                        clearEnvironment(ENV_PARCEL); +                        setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET); +                        updateEnvironment(); +                    } +                }; +            } -        if (parcel_id == INVALID_PARCEL_ID)              LLEnvironmentRequest::initiate(cb); +        } +        else if (cb) +            cb(parcel_id, EnvironmentInfo::ptr_t());          return;      } diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 91f755e71b..3e50700377 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -3279,7 +3279,7 @@ void LLPanelLandEnvironment::refresh()          return;      } -    if ((!mCurrentEnvironment) || (mCurrentEnvironment->mParcelId != parcel->getLocalID())) +    if (LLEnvironment::instance().isExtendedEnvironmentEnabled() && ((!mCurrentEnvironment) || (mCurrentEnvironment->mParcelId != parcel->getLocalID())))      {          mCurrentParcelId = parcel->getLocalID();          refreshFromSource(); diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index f84fdbb897..dfb803a0a3 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -68,8 +68,10 @@ namespace      const std::string   FIELD_SKY_STAR_BRIGHTNESS("star_brightness");      const std::string   FIELD_SKY_SUN_ROTATION("sun_rotation");      const std::string   FIELD_SKY_SUN_IMAGE("sun_image"); +    const std::string   FIELD_SKY_SUN_SCALE("sun_scale");      const std::string   FIELD_SKY_MOON_ROTATION("moon_rotation");      const std::string   FIELD_SKY_MOON_IMAGE("moon_image"); +    const std::string   FIELD_SKY_MOON_SCALE("moon_scale");      const F32 SLIDER_SCALE_SUN_AMBIENT(3.0f);      const F32 SLIDER_SCALE_BLUE_HORIZON_DENSITY(2.0f); @@ -422,6 +424,12 @@ void LLPanelSettingsSkySunMoonTab::onSunRotationChanged()      mSkySettings->update();  } +void LLPanelSettingsSkySunMoonTab::onSunScaleChanged() +{ +    mSkySettings->setSunScale((getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->getValue().asReal())); +    mSkySettings->update(); +} +  void LLPanelSettingsSkySunMoonTab::onSunImageChanged()  {      mSkySettings->setSunTextureId(getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->getValue().asUUID()); @@ -439,6 +447,13 @@ void LLPanelSettingsSkySunMoonTab::onMoonImageChanged()      mSkySettings->setMoonTextureId(getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->getValue().asUUID());      mSkySettings->update();  } + +void LLPanelSettingsSkySunMoonTab::onMoonScaleChanged() +{ +    mSkySettings->setMoonScale((getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->getValue().asReal())); +    mSkySettings->update(); +} +  LLPanelSettingsDensityTab::LLPanelSettingsDensityTab()  {     diff --git a/indra/newview/llpaneleditsky.h b/indra/newview/llpaneleditsky.h index c9e0e3bd56..982315adff 100644 --- a/indra/newview/llpaneleditsky.h +++ b/indra/newview/llpaneleditsky.h @@ -121,8 +121,10 @@ private:      void                    onGlowChanged();      void                    onStarBrightnessChanged();      void                    onSunRotationChanged(); +    void                    onSunScaleChanged();      void                    onSunImageChanged();      void                    onMoonRotationChanged(); +    void                    onMoonScaleChanged();      void                    onMoonImageChanged();  }; diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 6de17cbee9..d91f9110e0 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -66,6 +66,9 @@ const std::string LLPanelEnvironmentInfo::CHK_ALLOWOVERRIDE("chk_allow_override"  const std::string LLPanelEnvironmentInfo::BTN_APPLY("btn_apply");  const std::string LLPanelEnvironmentInfo::BTN_CANCEL("btn_cancel");  const std::string LLPanelEnvironmentInfo::LBL_TIMEOFDAY("lbl_apparent_time"); +const std::string LLPanelEnvironmentInfo::PNL_SETTINGS("pnl_environment_config"); +const std::string LLPanelEnvironmentInfo::PNL_BUTTONS("pnl_environment_buttons"); +const std::string LLPanelEnvironmentInfo::PNL_DISABLED("pnl_environment_disabled");  const std::string LLPanelEnvironmentInfo::STR_LABEL_USEDEFAULT("str_label_use_default");  const std::string LLPanelEnvironmentInfo::STR_LABEL_USEREGION("str_label_use_region"); @@ -125,6 +128,12 @@ void LLPanelEnvironmentInfo::refresh()      if (gDisconnected)          return; +    setControlsEnabled(canEdit()); +    if (!mCurrentEnvironment) +    { +        return; +    } +      if ((!mCurrentEnvironment->mDayCycle) ||          ((mCurrentEnvironment->mParcelId == INVALID_PARCEL_ID) && (mCurrentEnvironment->mDayCycle->getAssetId() == LLSettingsDay::GetDefaultAssetId() )))      { @@ -161,7 +170,6 @@ void LLPanelEnvironmentInfo::refresh()      udpateApparentTimeOfDay(); -    setControlsEnabled(canEdit());  }  void LLPanelEnvironmentInfo::refreshFromSource() @@ -229,19 +237,27 @@ LLFloaterEditExtDayCycle * LLPanelEnvironmentInfo::getEditFloater()  void LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)  {      S32 rdo_selection = getChild<LLRadioGroup>(RDG_ENVIRONMENT_SELECT)->getSelectedIndex(); +    bool is_legacy = (mCurrentEnvironment) ? mCurrentEnvironment->mIsLegacy : true; + +    bool is_unavailable = (is_legacy && (!mCurrentEnvironment || (mCurrentEnvironment->mParcelId != INVALID_PARCEL_ID)));      getChild<LLUICtrl>(RDG_ENVIRONMENT_SELECT)->setEnabled(enabled); -    getChild<LLUICtrl>(RDO_USEDEFAULT)->setEnabled(enabled); -    getChild<LLUICtrl>(RDO_USEINV)->setEnabled(enabled); -    getChild<LLUICtrl>(RDO_USECUSTOM)->setEnabled(enabled); +    getChild<LLUICtrl>(RDO_USEDEFAULT)->setEnabled(enabled && !is_legacy); +    getChild<LLUICtrl>(RDO_USEINV)->setEnabled(false);      // these two are selected automatically based on  +    getChild<LLUICtrl>(RDO_USECUSTOM)->setEnabled(false);      getChild<LLUICtrl>(EDT_INVNAME)->setEnabled(FALSE); -    getChild<LLUICtrl>(BTN_SELECTINV)->setEnabled(enabled); +    getChild<LLUICtrl>(BTN_SELECTINV)->setEnabled(enabled && !is_legacy);      getChild<LLUICtrl>(BTN_EDIT)->setEnabled(enabled); -    getChild<LLUICtrl>(SLD_DAYLENGTH)->setEnabled(enabled && (rdo_selection != 0)); -    getChild<LLUICtrl>(SLD_DAYOFFSET)->setEnabled(enabled && (rdo_selection != 0)); -    getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setEnabled(enabled && (mCurrentParcelId == INVALID_PARCEL_ID)); +    getChild<LLUICtrl>(SLD_DAYLENGTH)->setEnabled(enabled && (rdo_selection != 0) && !is_legacy); +    getChild<LLUICtrl>(SLD_DAYOFFSET)->setEnabled(enabled && (rdo_selection != 0) && !is_legacy); +    getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setEnabled(enabled && (mCurrentParcelId == INVALID_PARCEL_ID) && !is_legacy);      getChild<LLUICtrl>(BTN_APPLY)->setEnabled(enabled && (mDirtyFlag != 0));      getChild<LLUICtrl>(BTN_CANCEL)->setEnabled(enabled && (mDirtyFlag != 0)); + +    getChild<LLUICtrl>(PNL_SETTINGS)->setVisible(!is_unavailable); +    getChild<LLUICtrl>(PNL_BUTTONS)->setVisible(!is_unavailable); +    getChild<LLUICtrl>(PNL_DISABLED)->setVisible(is_unavailable); +  }  void LLPanelEnvironmentInfo::setApplyProgress(bool started) diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h index 44e3c11a82..971f12c7e7 100644 --- a/indra/newview/llpanelenvironment.h +++ b/indra/newview/llpanelenvironment.h @@ -76,6 +76,9 @@ protected:      static const std::string    BTN_APPLY;      static const std::string    BTN_CANCEL;      static const std::string    LBL_TIMEOFDAY; +    static const std::string    PNL_SETTINGS; +    static const std::string    PNL_BUTTONS; +    static const std::string    PNL_DISABLED;      static const std::string    STR_LABEL_USEDEFAULT; diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index 07f8045546..28631e2b7b 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -39,7 +39,6 @@  // Library includes (after viewer)  #include "lluictrlfactory.h" -  static LLPanelInjector<LLPanelVoiceDeviceSettings> t_panel_group_general("panel_voice_device_settings");  static const std::string DEFAULT_DEVICE("Default"); @@ -233,18 +232,18 @@ void LLPanelVoiceDeviceSettings::refresh()  	}  	else if (LLVoiceClient::getInstance()->deviceSettingsUpdated())  	{ -		LLVoiceDeviceList::const_iterator iter; +		LLVoiceDeviceList::const_iterator device;  		if(mCtrlInputDevices)  		{  			mCtrlInputDevices->removeall();  			mCtrlInputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM); -			for(iter=LLVoiceClient::getInstance()->getCaptureDevices().begin();  -				iter != LLVoiceClient::getInstance()->getCaptureDevices().end(); -				iter++) +			for(device=LLVoiceClient::getInstance()->getCaptureDevices().begin();  +				device != LLVoiceClient::getInstance()->getCaptureDevices().end(); +				device++)  			{ -				mCtrlInputDevices->add(getLocalizedDeviceName(*iter), *iter, ADD_BOTTOM); +				mCtrlInputDevices->add(getLocalizedDeviceName(device->display_name), device->full_name, ADD_BOTTOM);  			}  			// Fix invalid input audio device preference. @@ -261,10 +260,11 @@ void LLPanelVoiceDeviceSettings::refresh()  			mCtrlOutputDevices->removeall();  			mCtrlOutputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM); -			for(iter= LLVoiceClient::getInstance()->getRenderDevices().begin();  -				iter !=  LLVoiceClient::getInstance()->getRenderDevices().end(); iter++) +			for(device = LLVoiceClient::getInstance()->getRenderDevices().begin();  +				device !=  LLVoiceClient::getInstance()->getRenderDevices().end(); +                device++)  			{ -				mCtrlOutputDevices->add(getLocalizedDeviceName(*iter), *iter, ADD_BOTTOM); +                mCtrlOutputDevices->add(getLocalizedDeviceName(device->display_name), device->full_name, ADD_BOTTOM);  			}  			// Fix invalid output audio device preference. diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 503815e2ed..e1dca4ae43 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -79,7 +79,7 @@ LLVoiceHandler gVoiceHandler;  std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserver::EStatusType inStatus)  { -	std::string result = "UNKNOWN"; +	std::string result = "UNTRANSLATED";  	// Prevent copy-paste errors when updating this list...  #define CASE(x)  case x:  result = #x;  break @@ -92,12 +92,18 @@ std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserv  			CASE(STATUS_JOINED);  			CASE(STATUS_LEFT_CHANNEL);  			CASE(STATUS_VOICE_DISABLED); +			CASE(STATUS_VOICE_ENABLED);  			CASE(BEGIN_ERROR_STATUS);  			CASE(ERROR_CHANNEL_FULL);  			CASE(ERROR_CHANNEL_LOCKED);  			CASE(ERROR_NOT_AVAILABLE);  			CASE(ERROR_UNKNOWN);  		default: +            { +                std::ostringstream stream; +                stream << "UNKNOWN(" << (int)inStatus << ")"; +                result = stream.str(); +            }  			break;  	} diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 32637dcf42..337f01f3e5 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -40,8 +40,19 @@ class LLVOAvatar;  // devices -typedef std::vector<std::string> LLVoiceDeviceList;	 - +class LLVoiceDevice +{ +  public: +    std::string display_name; // friendly value for the user +    std::string full_name;  // internal value for selection + +    LLVoiceDevice(const std::string& display_name, const std::string& full_name) +        :display_name(display_name) +        ,full_name(full_name) +    { +    }; +}; +typedef std::vector<LLVoiceDevice> LLVoiceDeviceList;  class LLVoiceClientParticipantObserver  { diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 1676f70b1e..b90e09b739 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -99,6 +99,7 @@ namespace {      const int CONNECT_RETRY_MAX = 3;      const F32 LOGIN_ATTEMPT_TIMEOUT = 30.0f; +    const F32 LOGOUT_ATTEMPT_TIMEOUT = 5.0f;      const int LOGIN_RETRY_MAX = 3;      const F32 PROVISION_RETRY_TIMEOUT = 2.0; @@ -259,9 +260,16 @@ static void killGateway()  {  	if (sGatewayPtr)  	{ +        LL_DEBUGS("Voice") << "SLVoice " << sGatewayPtr->getStatusString() << LL_ENDL; +  		sGatewayPump.stopListening("VivoxDaemonPump"); -		sGatewayPtr->kill(); +		sGatewayPtr->kill(__FUNCTION__); +        sGatewayPtr=NULL;  	} +    else +    { +        LL_DEBUGS("Voice") << "no gateway" << LL_ENDL; +    }  }  /////////////////////////////////////////////////////////////////////////////////////////////// @@ -283,7 +291,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :  	mDevicesListUpdated(false),  	mAreaVoiceDisabled(false), -	mAudioSession(), +	mAudioSession(), // TBD - should be NULL  	mAudioSessionChanged(false),  	mNextAudioSession(), @@ -416,6 +424,7 @@ void LLVivoxVoiceClient::cleanUp()  	deleteAllSessions();  	deleteAllVoiceFonts();  	deleteVoiceFontTemplates(); +    LL_DEBUGS("Voice") << "exiting" << LL_ENDL;  }  //--------------------------------------------------- @@ -645,18 +654,18 @@ void LLVivoxVoiceClient::idle(void* user_data)  //   void LLVivoxVoiceClient::voiceControlCoro()  { +    LL_DEBUGS("Voice") << "starting" << LL_ENDL;      mIsCoroutineActive = true;      LLCoros::set_consuming(true);      while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)      { -        LL_INFOS("Voice") << "Suspending voiceControlCoro() due to teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL; +        LL_DEBUGS("Voice") << "Suspending voiceControlCoro() momentarily for teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL;          llcoro::suspendUntilTimeout(1.0);      }      do      { -                  if (startAndConnectSession())          {              if (mTuningMode) @@ -666,6 +675,7 @@ void LLVivoxVoiceClient::voiceControlCoro()              waitForChannel(); // this doesn't normally return unless relog is needed or shutting down +            LL_DEBUGS("Voice") << "lost channel RelogRequested=" << mRelogRequested << LL_ENDL;                          endAndDisconnectSession();          } @@ -673,16 +683,23 @@ void LLVivoxVoiceClient::voiceControlCoro()          // that we attempted to relog into Vivox and were rejected.          // Rather than just quit out of voice, we will tear it down (above)          // and then reconstruct the voice connecion from scratch. +        LL_DEBUGS("Voice") +            << "disconnected" +            << " RelogRequested=" << mRelogRequested +            << LL_ENDL;                      if (mRelogRequested)          { +            LL_INFOS("Voice") << "will attempt to reconnect to voice" << LL_ENDL;              while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)              { +                LL_INFOS("Voice") << "waiting for SLVoice to exit" << LL_ENDL;                  llcoro::suspendUntilTimeout(1.0);              }          }      } -    while (mRelogRequested); +    while (mVoiceEnabled && mRelogRequested);      mIsCoroutineActive = false; +    LL_INFOS("Voice") << "exiting" << LL_ENDL;  } @@ -714,6 +731,8 @@ bool LLVivoxVoiceClient::startAndConnectSession()  bool LLVivoxVoiceClient::endAndDisconnectSession()  { +    LL_DEBUGS("Voice") << LL_ENDL; +      breakVoiceConnection(true);      killGateway(); @@ -723,13 +742,15 @@ bool LLVivoxVoiceClient::endAndDisconnectSession()  bool LLVivoxVoiceClient::callbackEndDaemon(const LLSD& data)  { -    if (!LLAppViewer::isExiting()) +    if (!LLAppViewer::isExiting() && mVoiceEnabled)      { +        LL_WARNS("Voice") << "SLVoice terminated " << ll_stream_notation_sd(data) << LL_ENDL;          terminateAudioSession(false);          closeSocket();          cleanUp();          LLVoiceClient::getInstance()->setUserPTTState(false);          gAgent.setVoiceConnected(false); +        mRelogRequested = true;      }      sGatewayPump.stopListening("VivoxDaemonPump");      return false; @@ -741,6 +762,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()      if (!voiceEnabled())      {          // Voice is locked out, we must not launch the vivox daemon. +        LL_WARNS("Voice") << "voice disabled; not starting daemon" << LL_ENDL;          return false;      } @@ -748,11 +770,6 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()      {  #ifndef VIVOXDAEMON_REMOTEHOST          // Launch the voice daemon - -        // *FIX:Mani - Using the executable dir instead  -        // of mAppRODataDir, the working directory from which the app -        // is launched. -        //std::string exe_path = gDirUtilp->getAppRODataDir();          std::string exe_path = gDirUtilp->getExecutableDir();          exe_path += gDirUtilp->getDirDelimiter();  #if LL_WINDOWS @@ -807,13 +824,16 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()              params.postend = sGatewayPump.getName();              sGatewayPump.listen("VivoxDaemonPump", boost::bind(&LLVivoxVoiceClient::callbackEndDaemon, this, _1)); +            LL_INFOS("Voice") << "Launching SLVoice" << LL_ENDL; +            LL_DEBUGS("Voice") << "SLVoice params " << params << LL_ENDL; +              sGatewayPtr = LLProcess::create(params);              mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost").c_str(), gSavedSettings.getU32("VivoxVoicePort"));          }          else          { -            LL_INFOS("Voice") << exe_path << " not found." << LL_ENDL; +            LL_WARNS("Voice") << exe_path << " not found." << LL_ENDL;              return false;          }  #else @@ -836,6 +856,10 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()          mMainSessionGroupHandle.clear();      } +    else +    { +        LL_DEBUGS("Voice") << " gateway running; not attempting to start" << LL_ENDL; +    }      //---------------------------------------------------------------------      llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); @@ -900,12 +924,15 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()      while (!gAgent.getRegion() || !gAgent.getRegion()->capabilitiesReceived())      { +        LL_DEBUGS("Voice") << "no capabilities for voice provisioning; waiting " << LL_ENDL;          // *TODO* Pump a message for wake up.          llcoro::suspend();      }      std::string url = gAgent.getRegionCapability("ProvisionVoiceAccountRequest"); +    LL_DEBUGS("Voice") << "region ready for voice provisioning; url=" << url << LL_ENDL; +      LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);      LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t          httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceAccountProvision", httpPolicy)); @@ -953,14 +980,23 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()      std::string voiceUserName = result["username"].asString();      std::string voicePassword = result["password"].asString(); -    //LL_DEBUGS("Voice") << "ProvisionVoiceAccountRequest response:" << dumpResponse() << LL_ENDL; -      if (result.has("voice_sip_uri_hostname")) +    {          voiceSipUriHostname = result["voice_sip_uri_hostname"].asString(); - +    } +          // this key is actually misnamed -- it will be an entire URI, not just a hostname.      if (result.has("voice_account_server_name")) +    {          voiceAccountServerUri = result["voice_account_server_name"].asString(); +    } + +    LL_DEBUGS("Voice") << "ProvisionVoiceAccountRequest response" +                       << " user " << (voiceUserName.empty() ? "not set" : "set") +                       << " password " << (voicePassword.empty() ? "not set" : "set") +                       << " sip uri " << voiceSipUriHostname +                       << " account uri " << voiceAccountServerUri +                       << LL_ENDL;      setLoginInfo(voiceUserName, voicePassword, voiceSipUriHostname, voiceAccountServerUri); @@ -972,8 +1008,11 @@ bool LLVivoxVoiceClient::establishVoiceConnection()      LLEventPump &voiceConnectPump = LLEventPumps::instance().obtain("vivoxClientPump");      if (!mVoiceEnabled && mIsInitialized) +    { +        LL_WARNS("Voice") << "cannot establish connection; enabled "<<mVoiceEnabled<<" initialized "<<mIsInitialized<<LL_ENDL;          return false; - +    } +          LLSD result;      bool connected(false);      bool giving_up(false); @@ -1035,7 +1074,7 @@ bool LLVivoxVoiceClient::establishVoiceConnection()  bool LLVivoxVoiceClient::breakVoiceConnection(bool corowait)  { -    LL_DEBUGS("Voice") << LL_ENDL; +    LL_DEBUGS("Voice") << "( wait=" << corowait << ")" << LL_ENDL;      LLEventPump &voicePump = LLEventPumps::instance().obtain("vivoxClientPump");      bool retval(true); @@ -1044,7 +1083,9 @@ bool LLVivoxVoiceClient::breakVoiceConnection(bool corowait)      if (corowait)      { -        LLSD result = llcoro::suspendUntilEventOn(voicePump); +        LLSD timeoutResult(LLSDMap("connector", "timeout")); + +        LLSD result = llcoro::suspendUntilEventOnWithTimeout(voicePump, LOGOUT_ATTEMPT_TIMEOUT, timeoutResult);          LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL;          retval = result.has("connector"); @@ -1073,6 +1114,7 @@ bool LLVivoxVoiceClient::breakVoiceConnection(bool corowait)  #endif      } +    LL_DEBUGS("Voice") << "closing SLVoice socket" << LL_ENDL;      closeSocket();		// Need to do this now -- bad things happen if the destructor does it later.      cleanUp();      mConnected = false; @@ -1174,31 +1216,35 @@ bool LLVivoxVoiceClient::loginToVivox()  void LLVivoxVoiceClient::logoutOfVivox(bool wait)  { +    if (mIsLoggedIn) +    { +        // Ensure that we'll re-request provisioning before logging in again +        mAccountPassword.clear(); +        mVoiceAccountServerURI.clear(); -    if (!mIsLoggedIn) -        return; - -    // Ensure that we'll re-request provisioning before logging in again -    mAccountPassword.clear(); -    mVoiceAccountServerURI.clear(); - -    logoutSendMessage(); +        logoutSendMessage(); -    if (wait) -    { -        LLEventPump &voicePump = LLEventPumps::instance().obtain("vivoxClientPump"); -        LLSD timeoutResult(LLSDMap("lougout", "timeout")); +        if (wait) +        { +            LLEventPump &voicePump = LLEventPumps::instance().obtain("vivoxClientPump"); +            LLSD timeoutResult(LLSDMap("logout", "timeout")); -        LLSD result = llcoro::suspendUntilEventOnWithTimeout(voicePump, LOGIN_ATTEMPT_TIMEOUT, timeoutResult); +            LL_DEBUGS("Voice") +                << "waiting for logout response on " +                << voicePump.getName() +                << LL_ENDL; -        LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL; +            LLSD result = llcoro::suspendUntilEventOnWithTimeout(voicePump, LOGOUT_ATTEMPT_TIMEOUT, timeoutResult); -        if (result.has("logout")) +            LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL; +        } +        else          { +            LL_DEBUGS("Voice") << "not waiting for logout" << LL_ENDL;          } -    } -    mIsLoggedIn = false; +        mIsLoggedIn = false; +    }  } @@ -1269,6 +1315,10 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo()          // state.  If the cap request is still pending,          // the responder will check to see if we've moved          // to a new session and won't change any state. +        LL_DEBUGS("Voice") << "terminate requested " << mSessionTerminateRequested +                           << " enabled " << mVoiceEnabled +                           << " initialized " << mIsInitialized +                           << LL_ENDL;          terminateAudioSession(true);          return false;      } @@ -1293,17 +1343,30 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo()          LLSD voice_credentials = result["voice_credentials"];          if (voice_credentials.has("channel_uri"))          { +            LL_DEBUGS("Voice") << "got voice channel uri" << LL_ENDL;              uri = voice_credentials["channel_uri"].asString();          } +        else +        { +            LL_WARNS("Voice") << "No voice channel uri" << LL_ENDL; +        } +                  if (voice_credentials.has("channel_credentials"))          { +            LL_DEBUGS("Voice") << "got voice channel credentials" << LL_ENDL;              credentials =                  voice_credentials["channel_credentials"].asString();          } -    } +        else +        { +            LL_WARNS("Voice") << "No voice channel credentials" << LL_ENDL; -    if (!uri.empty()) -        LL_INFOS("Voice") << "Voice URI is " << uri << LL_ENDL; +        } +    } +    else +    { +        LL_WARNS("Voice") << "No voice credentials" << LL_ENDL; +    }      // set the spatial channel.  If no voice credentials or uri are       // available, then we simply drop out of voice spatially. @@ -1366,7 +1429,10 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)      if (!mVoiceEnabled && mIsInitialized)      { -        LL_DEBUGS("Voice") << "Voice no longer enabled. Exiting." << LL_ENDL; +        LL_DEBUGS("Voice") << "Voice no longer enabled. Exiting" +                           << " enabled " << mVoiceEnabled +                           << " initialized " << mIsInitialized +                           << LL_ENDL;          mIsJoiningSession = false;          // User bailed out during connect -- jump straight to teardown.          terminateAudioSession(true); @@ -1489,7 +1555,7 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)      if (mAudioSession)      { -        LL_INFOS("Voice") << "Terminating current voice session " << mAudioSession->mHandle << LL_ENDL; +        LL_INFOS("Voice") << "terminateAudioSession(" << wait << ") Terminating current voice session " << mAudioSession->mHandle << LL_ENDL;          if (mIsLoggedIn)          { @@ -1519,7 +1585,9 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)                      LLSD result;                      do                      { -                        result = llcoro::suspendUntilEventOn(voicePump); +                        LLSD timeoutResult(LLSDMap("session", "timeout")); + +                        result = llcoro::suspendUntilEventOnWithTimeout(voicePump, LOGOUT_ATTEMPT_TIMEOUT, timeoutResult);                          LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL;                          if (result.has("session")) @@ -1534,7 +1602,7 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)                              }                              std::string message = result["session"].asString(); -                            if (message == "removed") +                            if (message == "removed" || message == "timeout")                                  break;                          }                      } while (true); @@ -1559,11 +1627,10 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)          // The old session may now need to be deleted.          reapSession(oldSession); -      }      else      { -        LL_WARNS("Voice") << "stateSessionTerminated with NULL mAudioSession" << LL_ENDL; +        LL_WARNS("Voice") << "terminateAudioSession(" << wait << ") with NULL mAudioSession" << LL_ENDL;      }      notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); @@ -1573,13 +1640,15 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)      // the region chat.      mSessionTerminateRequested = false; -    if ((mVoiceEnabled || !mIsInitialized) && !mRelogRequested  && !LLApp::isExiting()) -    { -        // Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state). -        return true; -    } - -    return false; +    bool status=((mVoiceEnabled || !mIsInitialized) && !mRelogRequested  && !LLApp::isExiting()); +    LL_DEBUGS("Voice") << "exiting" +                       << " VoiceEnabled " << mVoiceEnabled +                       << " IsInitialized " << mIsInitialized +                       << " RelogRequested " << mRelogRequested +                       << " AppExiting " << LLApp::isExiting() +                       << " returning " << status +                       << LL_ENDL; +    return status;  }  bool LLVivoxVoiceClient::waitForChannel() @@ -1640,7 +1709,18 @@ bool LLVivoxVoiceClient::waitForChannel()                  sessionStatePtr_t joinSession = mNextAudioSession;                  mNextAudioSession.reset();                  if (!runSession(joinSession)) +                { +                    LL_DEBUGS("Voice") << "runSession returned false; leaving inner loop" << LL_ENDL;                      break; +                } +                else +                { +                    LL_DEBUGS("Voice") +                        << "runSession returned true to inner loop" +                        << " RelogRequested=" << mRelogRequested +                        << " VoiceEnabled=" << mVoiceEnabled +                        << LL_ENDL; +                }              }              if (!mNextAudioSession) @@ -1649,20 +1729,33 @@ bool LLVivoxVoiceClient::waitForChannel()              }          } while (mVoiceEnabled && !mRelogRequested); +        LL_DEBUGS("Voice") +            << "leaving inner waitForChannel loop" +            << " RelogRequested=" << mRelogRequested +            << " VoiceEnabled=" << mVoiceEnabled +            << LL_ENDL; +          mIsProcessingChannels = false;          logoutOfVivox(true);          if (mRelogRequested)          { +            LL_DEBUGS("Voice") << "Relog Requested, restarting provisioning" << LL_ENDL;              if (!provisionVoiceAccount())              { +                LL_WARNS("Voice") << "provisioning voice failed; giving up" << LL_ENDL;                  giveUp();                  return false;              }          } -    } while (mVoiceEnabled && mRelogRequested); +    } while (mVoiceEnabled && mRelogRequested && isGatewayRunning()); +    LL_DEBUGS("Voice") +        << "exiting" +        << " RelogRequested=" << mRelogRequested +        << " VoiceEnabled=" << mVoiceEnabled +        << LL_ENDL;      return true;  } @@ -1676,6 +1769,7 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)          if (mSessionTerminateRequested)          { +            LL_DEBUGS("Voice") << "runSession terminate requested " << LL_ENDL;              terminateAudioSession(true);          }          // if a relog has been requested then addAndJoineSession  @@ -1694,7 +1788,7 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)      mIsInChannel = true;      mMuteMicDirty = true; -    while (mVoiceEnabled && !mSessionTerminateRequested && !mTuningMode) +    while (mVoiceEnabled && isGatewayRunning() && !mSessionTerminateRequested && !mTuningMode)      {          sendCaptureAndRenderDevices();          if (mAudioSession && mAudioSession->mParticipantsChanged) @@ -1744,7 +1838,9 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)          mIsInitialized = true;          LLSD result = llcoro::suspendUntilEventOnWithTimeout(voicePump, UPDATE_THROTTLE_SECONDS, timeoutEvent);          if (!result.has("timeout")) // logging the timeout event spams the log +        {              LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL; +        }          if (result.has("session"))          {                 if (result.has("handle")) @@ -1765,6 +1861,7 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)              if (message == "removed")              { +                LL_DEBUGS("Voice") << "session removed" << LL_ENDL;                  notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL);                  break;              } @@ -1774,15 +1871,16 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)              std::string message = result["login"];              if (message == "account_logout")              { +                LL_DEBUGS("Voice") << "logged out" << LL_ENDL;                  mIsLoggedIn = false;                  mRelogRequested = true;                  break;              }          } -          }      mIsInChannel = false; +    LL_DEBUGS("Voice") << "terminating at end of runSession" << LL_ENDL;      terminateAudioSession(true);      return true; @@ -1978,6 +2076,7 @@ bool LLVivoxVoiceClient::performMicTuning()                  if (mTuningSpeakerVolumeDirty)                  { +                    LL_INFOS("Voice") << "setting tuning speaker level to " << mTuningSpeakerVolume << LL_ENDL;                      stream                          << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetSpeakerLevel.1\">"                          << "<Level>" << mTuningSpeakerVolume << "</Level>" @@ -2335,11 +2434,10 @@ void LLVivoxVoiceClient::clearCaptureDevices()  	mCaptureDevices.clear();  } -void LLVivoxVoiceClient::addCaptureDevice(const std::string& name) +void LLVivoxVoiceClient::addCaptureDevice(const LLVoiceDevice& device)  { -	LL_DEBUGS("Voice") << name << LL_ENDL; - -	mCaptureDevices.push_back(name); +	LL_DEBUGS("Voice") << "display: '" << device.display_name << "' device: '" << device.full_name << "'" << LL_ENDL; +    mCaptureDevices.push_back(device);  }  LLVoiceDeviceList& LLVivoxVoiceClient::getCaptureDevices() @@ -2377,10 +2475,10 @@ void LLVivoxVoiceClient::clearRenderDevices()  	mRenderDevices.clear();  } -void LLVivoxVoiceClient::addRenderDevice(const std::string& name) +void LLVivoxVoiceClient::addRenderDevice(const LLVoiceDevice& device)  { -	LL_DEBUGS("Voice") << name << LL_ENDL; -	mRenderDevices.push_back(name); +	LL_DEBUGS("Voice") << "display: '" << device.display_name << "' device: '" << device.full_name << "'" << LL_ENDL; +    mRenderDevices.push_back(device);  }  LLVoiceDeviceList& LLVivoxVoiceClient::getRenderDevices() @@ -2528,13 +2626,13 @@ bool LLVivoxVoiceClient::deviceSettingsAvailable()  }  bool LLVivoxVoiceClient::deviceSettingsUpdated()  { +    bool updated = mDevicesListUpdated;  	if (mDevicesListUpdated)  	{  		// a hot swap event or a polling of the audio devices has been parsed since the last redraw of the input and output device panel. -		mDevicesListUpdated = !mDevicesListUpdated; // toggle the setting -		return true; +		mDevicesListUpdated = false; // toggle the setting  	} -	return false;		 +	return updated;		  }  void LLVivoxVoiceClient::refreshDeviceLists(bool clearCurrentList) @@ -2553,8 +2651,7 @@ void LLVivoxVoiceClient::daemonDied()  	// The daemon died, so the connection is gone.  Reset everything and start over.  	LL_WARNS("Voice") << "Connection to vivox daemon lost.  Resetting state."<< LL_ENDL; -	// Try to relaunch the daemon -    /*TODO:*/ +	//TODO: Try to relaunch the daemon  }  void LLVivoxVoiceClient::giveUp() @@ -2915,7 +3012,6 @@ void LLVivoxVoiceClient::sendPositionAndVolumeUpdate(void)  		}  	} -	//sendLocalAudioUpdates();  obsolete, used to send volume setting on position updates      std::string update(stream.str());  	if(!update.empty())  	{ @@ -2960,7 +3056,6 @@ void LLVivoxVoiceClient::sendLocalAudioUpdates()  {  	// Check all of the dirty states and then send messages to those needing to be changed.  	// Tuningmode hands its own mute settings. -  	std::ostringstream stream;  	if (mMuteMicDirty && !mTuningMode) @@ -2969,7 +3064,7 @@ void LLVivoxVoiceClient::sendLocalAudioUpdates()  		// Send a local mute command. -		LL_DEBUGS("Voice") << "Sending MuteLocalMic command with parameter " << (mMuteMic ? "true" : "false") << LL_ENDL; +		LL_INFOS("Voice") << "Sending MuteLocalMic command with parameter " << (mMuteMic ? "true" : "false") << LL_ENDL;  		stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">"  			<< "<ConnectorHandle>" << LLVivoxSecurity::getInstance()->connectorHandle() << "</ConnectorHandle>" @@ -3231,8 +3326,6 @@ void LLVivoxVoiceClient::sessionConnectResponse(std::string &requestId, int stat  	{  		LL_DEBUGS("Voice") << "Session.Connect response received (success)" << LL_ENDL;  	} - -    /*TODO: Post response?*/  }  void LLVivoxVoiceClient::logoutResponse(int statusCode, std::string &statusString) @@ -4037,7 +4130,7 @@ void LLVivoxVoiceClient::sessionNotificationEvent(std::string &sessionHandle, st  void LLVivoxVoiceClient::auxAudioPropertiesEvent(F32 energy)  { -	LL_DEBUGS("Voice") << "got energy " << energy << LL_ENDL; +	LL_DEBUGS("VoiceEnergy") << "got energy " << energy << LL_ENDL;  	mTuningEnergy = energy;  } @@ -4989,6 +5082,12 @@ void LLVivoxVoiceClient::setMuteMic(bool muted)  void LLVivoxVoiceClient::setVoiceEnabled(bool enabled)  { +    LL_DEBUGS("Voice") +        << "( " << (enabled ? "enabled" : "disabled") << " )" +        << " was "<< (mVoiceEnabled ? "enabled" : "disabled") +        << " coro "<< (mIsCoroutineActive ? "active" : "inactive") +        << LL_ENDL; +      	if (enabled != mVoiceEnabled)  	{  		// TODO: Refactor this so we don't call into LLVoiceChannel, but simply @@ -4998,6 +5097,7 @@ void LLVivoxVoiceClient::setVoiceEnabled(bool enabled)  		if (enabled)  		{ +            LL_DEBUGS("Voice") << "enabling" << LL_ENDL;  			LLVoiceChannel::getCurrentVoiceChannel()->activate();  			status = LLVoiceClientStatusObserver::STATUS_VOICE_ENABLED; @@ -5006,6 +5106,10 @@ void LLVivoxVoiceClient::setVoiceEnabled(bool enabled)                  LLCoros::instance().launch("LLVivoxVoiceClient::voiceControlCoro();",                      boost::bind(&LLVivoxVoiceClient::voiceControlCoro, LLVivoxVoiceClient::getInstance()));              } +            else +            { +                LL_DEBUGS("Voice") << "coro should be active.. not launching" << LL_ENDL; +            }  		}  		else  		{ @@ -5013,8 +5117,13 @@ void LLVivoxVoiceClient::setVoiceEnabled(bool enabled)  			LLVoiceChannel::getCurrentVoiceChannel()->deactivate();  			status = LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED;  		} -		notifyStatusObservers(status);		 + +		notifyStatusObservers(status);  	} +    else +    { +        LL_DEBUGS("Voice") << " no-op" << LL_ENDL; +    }  }  bool LLVivoxVoiceClient::voiceEnabled() @@ -5718,7 +5827,7 @@ void LLVivoxVoiceClient::deleteSession(const sessionStatePtr_t &session)  void LLVivoxVoiceClient::deleteAllSessions()  { -	LL_DEBUGS("Voice") << "called" << LL_ENDL; +	LL_DEBUGS("Voice") << LL_ENDL;      while (!mSessionsByHandle.empty())  	{ @@ -5769,6 +5878,10 @@ void LLVivoxVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer)  void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status)  { +    LL_DEBUGS("Voice") << "( " << LLVoiceClientStatusObserver::status2string(status) << " )" +                       << " mAudioSession=" << mAudioSession +                       << LL_ENDL; +  	if(mAudioSession)  	{  		if(status == LLVoiceClientStatusObserver::ERROR_UNKNOWN) @@ -5813,8 +5926,8 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta  	LL_DEBUGS("Voice")   		<< " " << LLVoiceClientStatusObserver::status2string(status)    		<< ", session URI " << getAudioSessionURI()  -		<< (inSpatialChannel()?", proximal is true":", proximal is false") -	<< LL_ENDL; +		<< ", proximal is " << inSpatialChannel() +        << LL_ENDL;  	for (status_observer_set_t::iterator it = mStatusObservers.begin();  		it != mStatusObservers.end(); @@ -7022,16 +7135,20 @@ void LLVivoxProtocolParser::EndTag(const char *tag)  		else if (!stricmp("Presence", tag))  			statusString = string;  		else if (!stricmp("CaptureDevices", tag)) +		{  			LLVivoxVoiceClient::getInstance()->setDevicesListUpdated(true); +		}  		else if (!stricmp("RenderDevices", tag)) +		{  			LLVivoxVoiceClient::getInstance()->setDevicesListUpdated(true); +		}  		else if (!stricmp("CaptureDevice", tag))  		{ -			LLVivoxVoiceClient::getInstance()->addCaptureDevice(deviceString); +			LLVivoxVoiceClient::getInstance()->addCaptureDevice(LLVoiceDevice(displayNameString, deviceString));  		}  		else if (!stricmp("RenderDevice", tag))  		{ -			LLVivoxVoiceClient::getInstance()->addRenderDevice(deviceString); +			LLVivoxVoiceClient::getInstance()->addRenderDevice(LLVoiceDevice(displayNameString, deviceString));  		}  		else if (!stricmp("BlockMask", tag))  			blockMask = string; diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 9d4af85c8c..50862cea1e 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -432,10 +432,10 @@ protected:  	//----------------------------------  	// devices  	void clearCaptureDevices(); -	void addCaptureDevice(const std::string& name); +	void addCaptureDevice(const LLVoiceDevice& device);  	void clearRenderDevices();  	void setDevicesListUpdated(bool state); -	void addRenderDevice(const std::string& name);	 +	void addRenderDevice(const LLVoiceDevice& device);	  	void buildSetAudioDevices(std::ostringstream &stream);  	void getCaptureDevicesSendMessage(); diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml index bb10e0c69e..3a1a8c432a 100644 --- a/indra/newview/skins/default/xui/en/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml @@ -18,9 +18,26 @@              height="450"              follows="left|right|top|bottom"              orientation="vertical"> +        <layout_panel +                auto_resize="true" +                user_resize="false" +                name="pnl_environment_disabled" +                visible="false"> +            <text follows="top|left|bottom|right" +                            font="SansSerif" +                            halign="center" +                            valign="top" +                            top_pad="20" +                            text_color="white"> +Parcel environmental settings are  +disabled on legacy regions. +            </text> +        </layout_panel>          <layout_panel                   auto_resize="true" -                user_resize="false"> +                user_resize="false" +                name="pnl_environment_config" +                visible="true">              <layout_stack                       left="5"                      top="5" @@ -165,7 +182,7 @@                              left_delta="0"                              top_pad="20"                              width="200"> -                        Apparent Time of Day Would Be: +                        Apparent Time of Day:                      </text>                      <text                              name="lbl_apparent_time" @@ -187,7 +204,8 @@                  auto_resize="true"                  user_resize="false"                  height="21" -                min_height="0"> +                min_height="0" +                name="pnl_environment_buttons">              <check_box                      height="20"                      label="Parcel Owners May Override Environment" diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml index 2b79a1056f..586aff4bb8 100644 --- a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml +++ b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml @@ -32,39 +32,39 @@                      width="120">                  Sun & Stars              </text> -                    <text -                            follows="left|top" -                            height="10" -                            layout="topleft" -                            left_delta="10" -                            top_delta="30" -                            width="100"> -                        Position: -                    </text> -                    <sun_moon_trackball -                        name="sun_rotation" -                        follows="left|top" -                        left_delta="0" -                        top_delta="20" -                        height="150" -                        width="150" -                        thumb_mode="sun" /> -                    <text -                            follows="left|top" -                            height="10" -                            layout="topleft" -                            left_delta="160" -                            top_delta="-20" -                            width="200"> -                        Image: -                    </text> -                    <texture_picker -                            height="123" -                            layout="topleft" -                            left_delta="5" -                            name="sun_image" -                            top_pad="10" -                            width="100"/> +            <text +                    follows="left|top" +                    height="10" +                    layout="topleft" +                    left_delta="10" +                    top_delta="30" +                    width="100"> +                Position: +            </text> +            <sun_moon_trackball +                    name="sun_rotation" +                    follows="left|top" +                    left_delta="0" +                    top_delta="20" +                    height="150" +                    width="150" +                    thumb_mode="sun" /> +            <text +                    follows="left|top" +                    height="10" +                    layout="topleft" +                    left_delta="160" +                    top_delta="-20" +                    width="200"> +                Image: +            </text> +            <texture_picker +                    height="123" +                    layout="topleft" +                    left_delta="5" +                    name="sun_image" +                    top_pad="10" +                    width="100"/>              <text                      follows="left|top"                      height="10" @@ -72,6 +72,29 @@                      left_delta="-5"                      top_delta="110"                      width="80"> +                Scale: +            </text> +            <slider +                    decimal_digits="2" +                    follows="left|top" +                    height="16" +                    increment="0.25" +                    initial_value="0" +                    layout="topleft" +                    left_delta="5" +                    min_val="0.25" +                    max_val="20" +                    name="sun_scale" +                    top_delta="15" +                    width="130" +                    can_edit_text="true"/> +            <text +                    follows="left|top" +                    height="10" +                    layout="topleft" +                    left_delta="-5" +                    top_delta="20" +                    width="80">                  Color:              </text>              <color_swatch @@ -89,7 +112,7 @@                      height="10"                      layout="topleft"                      left_delta="-160" -                    top_delta="47" +                    top_delta="27"                      width="200">                  Glow Focus:              </text> @@ -135,7 +158,7 @@                      height="10"                      layout="topleft"                      left_delta="-5" -                    top_delta="30" +                    top_delta="22"                      width="200">                  Star Brightness:              </text> @@ -195,13 +218,13 @@                          Position:                      </text>                      <sun_moon_trackball -                        name="moon_rotation" -                        follows="left|top" -                        left_delta="0" -                        top_delta="20" -                        height="150" -                        width="150" -                        thumb_mode="moon" /> +                            name="moon_rotation" +                            follows="left|top" +                            left_delta="0" +                            top_delta="20" +                            height="150" +                            width="150" +                            thumb_mode="moon" />                      <text                              follows="left|top"                              height="10" @@ -218,6 +241,29 @@                              name="moon_image"                              top_pad="10"                              width="100"/> +                    <text +                            follows="left|top" +                            height="10" +                            layout="topleft" +                            left_delta="-5" +                            top_delta="110" +                            width="80"> +                        Scale: +                    </text> +                    <slider +                            decimal_digits="2" +                            follows="left|top" +                            height="16" +                            increment="0.25" +                            initial_value="0" +                            layout="topleft" +                            left_delta="5" +                            min_val="0.25" +                            max_val="20" +                            name="sun_scale" +                            top_delta="15" +                            width="130" +                            can_edit_text="true"/>                  </layout_panel>              </layout_stack>          </layout_panel>  | 
