* Copyright (c) 1995-2002, Index Data
* See the file LICENSE for details.
*
- * $Id: unix.c,v 1.2 2002-06-18 21:30:38 adam Exp $
+ * $Id: unix.c,v 1.3 2002-07-03 13:36:55 adam Exp $
* UNIX socket COMSTACK. By Morten Bøgeskov.
*/
#ifndef WIN32
int unix_strtoaddr_ex(const char *str, struct sockaddr_un *add)
{
+ char *cp;
if (!unix_init ())
return 0;
TRC(fprintf(stderr, "unix_strtoaddress: %s\n", str ? str : "NULL"));
add->sun_family = AF_UNIX;
strncpy(add->sun_path, str, sizeof(add->sun_path));
+ cp = strchr (add->sun_path, ':');
+ if (cp)
+ *cp = '\0';
return 1;
}
/*
- * $Id: zoom-c.c,v 1.34 2002-07-01 12:59:12 adam Exp $
+ * $Id: zoom-c.c,v 1.35 2002-07-03 13:36:55 adam Exp $
*
* ZOOM layer for C, connections, result sets, queries.
*/
if (!cp || !*cp)
{
- cp = strchr (con->host_port, '/');
+ if (strncmp (con->host_port, "unix:", 5) == 0)
+ cp = strchr (con->host_port+5, ':');
+ else
+ cp = strchr (con->host_port, '/');
if (cp)
cp++;
- }
+ }
if (cp)
{
c = cp;