Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_con


Modified Files:
        ecore_con.c 


Log Message:
Permit explicit specification of socket path by using an absolute path in the service 
name.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/ecore_con.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ecore_con.c 20 Feb 2004 07:06:26 -0000      1.10
+++ ecore_con.c 28 Mar 2004 04:25:52 -0000      1.11
@@ -132,7 +132,10 @@
        else if (type == ECORE_CON_LOCAL_SYSTEM)
          {
             mask = 0;
-            snprintf(buf, sizeof(buf), "/tmp/.ecore_service|%s|%i", name, port);
+        if (name[0] == '/')
+          snprintf(buf, sizeof(buf), "%s|%i", name, port);
+        else
+          snprintf(buf, sizeof(buf), "/tmp/.ecore_service|%s|%i", name, port);
          }
        pmode = umask(mask);
        start:
@@ -286,7 +289,12 @@
             snprintf(buf, sizeof(buf), "%s/.ecore/%s/%i", homedir, name, port);
          }
        else if (type == ECORE_CON_LOCAL_SYSTEM)
-         snprintf(buf, sizeof(buf), "/tmp/.ecore_service|%s|%i", name, port);
+     {
+        if (name[0] == '/')
+          snprintf(buf, sizeof(buf), "%s|%i", name, port);
+        else
+              snprintf(buf, sizeof(buf), "/tmp/.ecore_service|%s|%i", name, port);
+     }
        svr->fd = socket(AF_UNIX, SOCK_STREAM, 0);
        if (svr->fd < 0) goto error;
        if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) goto error;




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to