X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fguardian.git;a=blobdiff_plain;f=modules%2FSocket.pm;h=9c1985c924bc253a5a2af06e918a9a3f352258eb;hp=5e5a9982e86cfff87603117591588713e7e12dd1;hb=ebd440a9314ad6a179403b6938f3a182bf2278d5;hpb=27dc0dbf5e72a5755366be045c4874770e92f79c diff --git a/modules/Socket.pm b/modules/Socket.pm index 5e5a998..9c1985c 100644 --- a/modules/Socket.pm +++ b/modules/Socket.pm @@ -33,13 +33,13 @@ sub Server () { # If the path for the socketfile does not exist, try to # create it. unless (-d "$socketpath") { - mkdir("$socketpath") or die "Could not create $socketpath: $!\n"; + mkdir("$socketpath") or die "Could not create $socketpath: $!"; } # Delete an existing socket file. if (-e "$socketfile") { unlink $socketfile - or die "Could not release existing socket file: $!\n"; + or die "Could not release existing socket file: $!"; } # Create a new UNIX socket. @@ -47,7 +47,7 @@ sub Server () { Local => $socketfile, Listen => SOMAXCONN, Type => SOCK_STREAM, - ) or die "Could not create socket: $!\n"; + ) or die "Could not create socket: $!"; # Return the server object. return $server; @@ -102,7 +102,7 @@ sub Message_Parser ($) { if ($optarg) { # The message is valid, return the event and # the optional argument. - return "$supported_commands{$command} $optarg"; + return "$supported_commands{$command} $optarg Socket User-requested action."; } else { # Only return the event for the recieved command. return "$supported_commands{$command}";