summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmediactrl.cpp2
-rw-r--r--indra/newview/llviewermedia.cpp24
-rw-r--r--indra/newview/llviewermedia.h2
3 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 8d8f9dbebb..9493fddf50 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -1055,7 +1055,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
auth_request_params.substitutions = args;
auth_request_params.payload = LLSD().with("media_id", mMediaTextureID);
- auth_request_params.functor.function = boost::bind(&LLViewerMedia::onAuthSubmit, _1, _2, mMediaSource->getMediaPlugin());
+ auth_request_params.functor.function = boost::bind(&LLViewerMedia::onAuthSubmit, _1, _2);
LLNotifications::instance().add(auth_request_params);
};
break;
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index dacd663f83..60608a2c28 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1046,15 +1046,23 @@ bool LLViewerMedia::isParcelAudioPlaying()
return (LLViewerMedia::hasParcelAudio() && gAudiop && LLAudioEngine::AUDIO_PLAYING == gAudiop->isInternetStreamPlaying());
}
-void LLViewerMedia::onAuthSubmit(const LLSD& notification, const LLSD& response, LLPluginClassMedia* media)
+void LLViewerMedia::onAuthSubmit(const LLSD& notification, const LLSD& response)
{
- if (response["ok"])
+ LLViewerMediaImpl *impl = LLViewerMedia::getMediaImplFromTextureID(notification["payload"]["media_id"]);
+ if(impl)
{
- media->sendAuthResponse(true, response["username"], response["password"]);
- }
- else
- {
- media->sendAuthResponse(false, "", "");
+ LLPluginClassMedia* media = impl->getMediaPlugin();
+ if(media)
+ {
+ if (response["ok"])
+ {
+ media->sendAuthResponse(true, response["username"], response["password"]);
+ }
+ else
+ {
+ media->sendAuthResponse(false, "", "");
+ }
+ }
}
}
@@ -3108,7 +3116,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
auth_request_params.substitutions = args;
auth_request_params.payload = LLSD().with("media_id", mTextureId);
- auth_request_params.functor.function = boost::bind(&LLViewerMedia::onAuthSubmit, _1, _2, plugin);
+ auth_request_params.functor.function = boost::bind(&LLViewerMedia::onAuthSubmit, _1, _2);
LLNotifications::instance().add(auth_request_params);
};
break;
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 83fe790839..e2e342cc45 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -131,7 +131,7 @@ public:
static bool isParcelMediaPlaying();
static bool isParcelAudioPlaying();
- static void onAuthSubmit(const LLSD& notification, const LLSD& response, LLPluginClassMedia* media);
+ static void onAuthSubmit(const LLSD& notification, const LLSD& response);
// Clear all cookies for all plugins
static void clearAllCookies();