Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the server is not on 127.0.0.1 in simulation mode
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 11 Feb 2005 07:40:49 +0000 (07:40 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 11 Feb 2005 07:40:49 +0000 (07:40 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@972 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/gras/ping/ping.c

index 3c6592a..631ed93 100644 (file)
@@ -149,7 +149,10 @@ int client(int argc,char *argv[]) {
   /* 1. Init the GRAS's infrastructure */
   gras_init(&argc, argv, NULL);
    
   /* 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]);
   if (argc == 3) {
     host=argv[1];
     port=atoi(argv[2]);