A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Readd this dead code to the tarball since removing it cleanly is harder
[simgrid.git]
/
examples
/
ping
/
ping.c
diff --git
a/examples/ping/ping.c
b/examples/ping/ping.c
index
b58078d
..
460e304
100644
(file)
--- a/
examples/ping/ping.c
+++ b/
examples/ping/ping.c
@@
-2,11
+2,10
@@
/* ping - ping/pong demo of GRAS features */
/* ping - ping/pong demo of GRAS features */
-/* Authors: Martin Quinson */
-/* Copyright (C) 2003 the OURAGAN project. */
+/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/* This program is free software; you can redistribute it and/or modify it
-
under the terms of the license (GNU LGPL) which comes with this package. */
+
*
under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
@@
-87,7
+86,7
@@
int server (int argc,char *argv[]) {
int port = 4000;
int port = 4000;
-
xbt_init(&argc,argv
);
+
gras_init(&argc,argv, NULL
);
g=gras_userdata_new(server_data_t);
if (argc == 2) {
g=gras_userdata_new(server_data_t);
if (argc == 2) {
@@
-117,9
+116,10
@@
int server (int argc,char *argv[]) {
if (!gras_if_RL())
gras_os_sleep(1,0);
if (!gras_if_RL())
gras_os_sleep(1,0);
+
gras_socket_close(g->sock);
free(g);
gras_socket_close(g->sock);
free(g);
-
xbt
_exit();
+
gras
_exit();
INFO0("SERVER: Done.");
return no_error;
}
INFO0("SERVER: Done.");
return no_error;
}
@@
-146,7
+146,7
@@
int client(int argc,char *argv[]) {
const char *host = "127.0.0.1";
int port = 4000;
const char *host = "127.0.0.1";
int port = 4000;
-
xbt_init(&argc, argv
);
+
gras_init(&argc, argv, NULL
);
g=gras_userdata_new(client_data_t);
if (argc == 3) {
g=gras_userdata_new(client_data_t);
if (argc == 3) {
@@
-195,7
+195,7
@@
int client(int argc,char *argv[]) {
gras_socket_close(g->sock);
free(g);
gras_socket_close(g->sock);
free(g);
-
xbt
_exit();
+
gras
_exit();
INFO0("Client: Done.");
return 0;
}
INFO0("Client: Done.");
return 0;
}