From ab8a508d2cb9aed388c7215e1c68c0d6787961d2 Mon Sep 17 00:00:00 2001 From: mquinson Date: Fri, 11 Feb 2005 07:40:49 +0000 Subject: [PATCH 1/1] 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 --- examples/gras/ping/ping.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]); -- 2.20.1