Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move datadesc and TCP sockets from GRAS to XBT.
[simgrid.git] / examples / amok / saturate / saturate.c
index 8c033b1..fde8bfc 100644 (file)
@@ -28,8 +28,8 @@ int sensor(int argc, char *argv[]);
 
 int sensor(int argc, char *argv[])
 {
-  gras_socket_t mysock;
-  gras_socket_t master;
+  xbt_socket_t mysock;
+  xbt_socket_t master;
 
   gras_init(&argc, argv);
   amok_bw_init();
@@ -100,7 +100,7 @@ static double XP(const char *bw1, const char *bw2,
 
 static void kill_buddy(char *name, int port)
 {
-  gras_socket_t sock = gras_socket_client(name, port);
+  xbt_socket_t sock = gras_socket_client(name, port);
   gras_msg_send(sock, "kill", NULL);
   gras_socket_close(sock);
 }
@@ -171,7 +171,6 @@ static void simple_saturation(int argc, char *argv[])
 /********************************************************************************************/
 static void full_fledged_saturation(int argc, char *argv[])
 {
-  xbt_ex_t e;
   double time1 = 5.0, bw1 = 5.0;        // 0.5 for test
   /* timers */
   double begin_simulated;
@@ -220,7 +219,7 @@ static void full_fledged_saturation(int argc, char *argv[])
         amok_bw_saturate_start(h1->name, h1->port, h2->name, h2->port, 0,       /* Be nice, compute msg_size yourself */
                                0 /* no timeout */ );
       }
-      CATCH(e) {
+      CATCH_ANONYMOUS {
         RETHROWF("Cannot ask peers to saturate the link: %s");
       }
       gras_os_sleep(5);