if port < 0 then drop port number

SVN revision: 33898
This commit is contained in:
Carsten Haitzler 2008-03-02 08:39:21 +00:00
parent f639b86ca5
commit e89ea49c8b
1 changed files with 6 additions and 1 deletions

View File

@ -199,7 +199,12 @@ ecore_con_server_add(Ecore_Con_Type compl_type, const char *name, int port,
{
mask = 0;
if (name[0] == '/')
snprintf(buf, sizeof(buf), "%s|%i", name, port);
{
if (port >= 0)
snprintf(buf, sizeof(buf), "%s|%i", name, port);
else
snprintf(buf, sizeof(buf), "%s", name);
}
else
snprintf(buf, sizeof(buf), "/tmp/.ecore_service|%s|%i", name, port);
}