summaryrefslogtreecommitdiffstats
path: root/lib/network/ifw.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/network/ifw.pm')
-rw-r--r--lib/network/ifw.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/network/ifw.pm b/lib/network/ifw.pm
index 40ff0ac..44f58da 100644
--- a/lib/network/ifw.pm
+++ b/lib/network/ifw.pm
@@ -18,7 +18,7 @@ sub new {
"com.mandriva.monitoring",
"/com/mandriva/monitoring/ifw",
"com.mandriva.monitoring.ifw");
- dbus_object::set_gtk2_watch($o);
+ $o->set_gtk2_watch;
$o;
}
@@ -138,4 +138,18 @@ sub attack_to_hash {
$attack;
}
+sub parse_listen_message {
+ my ($args) = @_;
+ my $listen = { mapn { $_[0] => $_[1] } [ 'program', 'port' ], $args };
+ $listen->{port} = unpack('S', pack('n', $listen->{port}));
+ $listen->{service} = get_service($listen->{port});
+ $listen->{message} = N("The \"%s\" application is trying to make a service (%s) available to the network.",
+ $listen->{program},
+ $listen->{service} ne $listen->{port} ? $listen->{service} :
+ #-PO: this should be kept lowercase since the expression is meant to be used between brackets
+ N("port %d", $listen->{port}),
+ );
+ $listen;
+}
+
1;