From: mquinson Date: Fri, 11 Feb 2005 07:40:49 +0000 (+0000) Subject: the server is not on 127.0.0.1 in simulation mode X-Git-Tag: v3.3~4379 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ab8a508d2cb9aed388c7215e1c68c0d6787961d2?hp=3233dd795ce5dde1057c2a52c4614ae36fd2da5d the server is not on 127.0.0.1 in simulation mode git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@972 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/gras/ping/ping.c b/examples/gras/ping/ping.c index 3c6592ac36..631ed93e14 100644 --- a/examples/gras/ping/ping.c +++ b/examples/gras/ping/ping.c @@ -149,7 +149,10 @@ int client(int argc,char *argv[]) { /* 1. Init the GRAS's infrastructure */ gras_init(&argc, argv, NULL); - /* 2. Get the server's address from the command line, if specified */ + /* 2. Get the server's address. + If in simulation, the default is not the same. In any case, the command line override defaults when specified */ + if (gras_if_SG()) + host = "Tremblay"; if (argc == 3) { host=argv[1]; port=atoi(argv[2]);