Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#94 Add unix domain socket support for "FILE" datasource scheme

closed-accepted
Terje Bless
None
5
2005-02-27
2004-12-12
Mtv Europe
No

Simple patch against 1.0.5 to add unix domain socket
support for "FILE" datasource scheme, just like bsd's
cat(1) does.

--- lib/file.pm.orig Sun Dec 12 22:33:27 2004
+++ lib/file.pm Sun Dec 12 22:32:18 2004
@@ -19,6 +19,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA
02139, USA.

use Common::Log;
+use Socket;

$main::gDSFetch{'file'} = \&fileFetch;

@@ -59,7 +60,9 @@
Info("Reading data from $file for " .
$target->{'auto-target-name'});

- if (open(F, "<$file")) {
+ if (open(F, "<$file") or
+ socket (F, PF_UNIX, SOCK_STREAM, 0) &&
+ connect(F, sockaddr_un($file))) {
my(@lines);
chomp(@lines = <F>);
close(F);

Discussion

  • Terje Bless
    Terje Bless
    2005-02-27

    • assigned_to: nobody --> tbe
     
  • Terje Bless
    Terje Bless
    2005-02-27

    Logged In: YES
    user_id=8470

    Patch applied in CVS.

     
  • Terje Bless
    Terje Bless
    2005-02-27

    • status: open --> closed-accepted