From d45c66677046503e5081035ef005c56839f80433 Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Mon, 30 Aug 2004 13:25:28 +0000 Subject: [PATCH] Bug 242150 implement NPN_GetValue of NPNVisOfflineBool patch by William Bardwell r+sr=jst git-svn-id: svn://10.0.0.236/trunk@161470 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/plugin/base/src/ns4xPlugin.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp index 66a0b0134d8..341cd6bddb4 100644 --- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp +++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp @@ -1811,9 +1811,17 @@ _getvalue(NPP npp, NPNVariable variable, void *result) *(NPBool*)result = FALSE; return NPERR_NO_ERROR; - case NPNVisOfflineBool: - *(NPBool*)result = FALSE; + case NPNVisOfflineBool: { + PRBool offline = PR_FALSE; + nsCOMPtr ioservice = do_GetService(NS_IOSERVICE_CONTRACTID, &res); + if (NS_SUCCEEDED(res)) + res = ioservice->GetOffline(&offline); + if (NS_FAILED(rv)) + return NPERR_GENERIC_ERROR; + + *(NPBool*)result = offline; return NPERR_NO_ERROR; + } case NPNVserviceManager: { nsIServiceManager * sm;