Bug 424626 - "(linux) Firefox is put into offline mode on startup when NetworkManager is running but not controlling the active network interface (e.g. when using PPP)" [p=mozilla@rosenauer.org (Wolfgang Rosenauer) r=roc a=beltzner]
git-svn-id: svn://10.0.0.236/trunk@252730 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
38ffde4cfb
commit
8b96c7b0cf
@ -45,6 +45,8 @@
|
|||||||
#include "nsServiceManagerUtils.h"
|
#include "nsServiceManagerUtils.h"
|
||||||
#include "nsIObserverService.h"
|
#include "nsIObserverService.h"
|
||||||
#include "nsStringAPI.h"
|
#include "nsStringAPI.h"
|
||||||
|
#include "nsIPrefBranch2.h"
|
||||||
|
#include "nsIPrefService.h"
|
||||||
|
|
||||||
// Define NetworkManager API constants. This avoids a dependency on
|
// Define NetworkManager API constants. This avoids a dependency on
|
||||||
// NetworkManager-devel.
|
// NetworkManager-devel.
|
||||||
@ -187,7 +189,17 @@ nsNetworkManagerListener::UpdateNetworkStatus(DBusMessage* msg) {
|
|||||||
if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_UINT32, &result,
|
if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_UINT32, &result,
|
||||||
DBUS_TYPE_INVALID))
|
DBUS_TYPE_INVALID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Don't update status if disabled by pref
|
||||||
|
nsCOMPtr<nsIPrefBranch2> prefs =
|
||||||
|
do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||||
|
if (prefs) {
|
||||||
|
PRBool ignore = PR_FALSE;
|
||||||
|
prefs->GetBoolPref("toolkit.networkmanager.disable", &ignore);
|
||||||
|
if (ignore)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mNetworkManagerActive = PR_TRUE;
|
mNetworkManagerActive = PR_TRUE;
|
||||||
|
|
||||||
PRBool wasUp = mLinkUp;
|
PRBool wasUp = mLinkUp;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user