X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=comstack%2Funix.c;h=fa26bb8b1ca8bdc8072973474ae282d810729b0e;hp=7666b29e4029320a964f9cca62ef6626da23fbad;hb=c3b984a6d1cf19b1731b7e783ae2c0fd539277ac;hpb=a774858896a9b56c966edbfb70d8eae1c91c4ad1 diff --git a/comstack/unix.c b/comstack/unix.c index 7666b29..fa26bb8 100644 --- a/comstack/unix.c +++ b/comstack/unix.c @@ -2,7 +2,7 @@ * 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 @@ -143,11 +143,15 @@ COMSTACK unix_type(int s, int blocking, int protocol, void *vp) 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; }