summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-03-03 18:17:12 +0000
committerOlivier Blin <oblin@mandriva.com>2009-03-03 18:17:12 +0000
commita63db013c53a49a6654a55a99f83a36d81b74d27 (patch)
tree97b62a70c6eefb7ff7d58a133f447b77565afd89 /bin
parent5aa345a630f9bd8324e3693d322cec1afcc542b5 (diff)
downloaddrakx-net-a63db013c53a49a6654a55a99f83a36d81b74d27.tar
drakx-net-a63db013c53a49a6654a55a99f83a36d81b74d27.tar.gz
drakx-net-a63db013c53a49a6654a55a99f83a36d81b74d27.tar.bz2
drakx-net-a63db013c53a49a6654a55a99f83a36d81b74d27.tar.xz
drakx-net-a63db013c53a49a6654a55a99f83a36d81b74d27.zip
fix crash in net_applet when mandi is started (happens if mandi was not available at net_applet start), this requires some API change to split init code, so that we do not add the dbus filters every time we try to reconnect the network::ifw object
Diffstat (limited to 'bin')
-rw-r--r--bin/drakids4
-rwxr-xr-xbin/net_applet7
2 files changed, 6 insertions, 5 deletions
diff --git a/bin/drakids b/bin/drakids
index dcaa1b2..4a223a9 100644
--- a/bin/drakids
+++ b/bin/drakids
@@ -45,7 +45,8 @@ my $w = ugtk2->new($title);
my $ifw;
eval {
- $ifw = network::ifw->new(dbus_object::system_bus(), sub {
+ my $bus = dbus_object::system_bus();
+ network::ifw::init($bus, sub {
my ($_con, $msg) = @_;
my $member = $msg->get_member;
if ($member eq 'Attack') {
@@ -62,6 +63,7 @@ eval {
$w->{window}->present;
}
});
+ $ifw = network::ifw->new($bus);
};
if ($@) {
diff --git a/bin/net_applet b/bin/net_applet
index 9fe641b..d62e302 100755
--- a/bin/net_applet
+++ b/bin/net_applet
@@ -193,11 +193,10 @@ $icon = Gtk2::StatusIcon->new;
eval { $dbus = dbus_object::system_bus() } if !defined($global_settings{NET_APPLET_DBUS}) || text2bool($global_settings{NET_APPLET_DBUS});
eval { $net->{monitor} = network::monitor->new($dbus) } if $dbus;
-eval {
+if ($dbus) {
require network::net_applet::ifw;
- network::net_applet::ifw::create();
-} if $dbus;
-
+ network::net_applet::ifw::init();
+}
if ($dbus) {
$dbus->{connection}->add_filter(sub {
my ($_con, $msg) = @_;