Skip to content
Snippets Groups Projects
Commit 3f7590aa authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

pretty print
parent 316772b4
No related branches found
No related tags found
No related merge requests found
/* $Id: GmshServer.cpp,v 1.20 2004-12-06 07:13:47 geuzaine Exp $ */ /* $Id: GmshServer.cpp,v 1.21 2004-12-06 07:30:28 geuzaine Exp $ */
/* /*
* Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle * Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
* *
...@@ -109,14 +109,12 @@ int Gmsh_StartClient(char *command, char *sockname) ...@@ -109,14 +109,12 @@ int Gmsh_StartClient(char *command, char *sockname)
return 1; return 1;
} }
if((port = strstr(sockname, ":"))){ /* INET socket */ if(!(port = strstr(sockname, ":")))
portno = atoi(port+1); portno = -1; /* UNIX socket */
} else
else{ portno = atoi(port+1); /* INET socket */
portno = -1;
}
if(portno < 0){ /* UNIX socket */ if(portno < 0){
/* delete the file if it already exists */ /* delete the file if it already exists */
Socket_UnlinkName(sockname); Socket_UnlinkName(sockname);
...@@ -135,7 +133,7 @@ int Gmsh_StartClient(char *command, char *sockname) ...@@ -135,7 +133,7 @@ int Gmsh_StartClient(char *command, char *sockname)
/* change permissions on the socket name in case it has to be rm'd later */ /* change permissions on the socket name in case it has to be rm'd later */
chmod(sockname, 0666); chmod(sockname, 0666);
} }
else{ /* INET socket */ else{
if(init != portno){ /* FIXME: need a better solution to deal with if(init != portno){ /* FIXME: need a better solution to deal with
addresses that have already been bound! */ addresses that have already been bound! */
init = portno; init = portno;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment