summaryrefslogtreecommitdiffstats
path: root/lib/network/ifw.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-05-25 15:39:46 +0000
committerOlivier Blin <oblin@mandriva.com>2007-05-25 15:39:46 +0000
commit1d37bfdbbe874abd6dcb5563eea19f531de09e1c (patch)
tree74845e43ed8fa59c7aaafd1a87efaa6b0c83c228 /lib/network/ifw.pm
parentc6ba983db7d5a82ee63599e775be0f8211447c72 (diff)
downloaddrakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar.gz
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar.bz2
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.tar.xz
drakx-net-1d37bfdbbe874abd6dcb5563eea19f531de09e1c.zip
sync with 2007.1 (because of SVN loss)2007.1
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;