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
Make bprintf abort on error, and define bvprintf accordingly.
[simgrid.git]
/
examples
/
amok
/
bandwidth
/
bandwidth.c
diff --git
a/examples/amok/bandwidth/bandwidth.c
b/examples/amok/bandwidth/bandwidth.c
index
28de73d
..
5ef8a16
100644
(file)
--- a/
examples/amok/bandwidth/bandwidth.c
+++ b/
examples/amok/bandwidth/bandwidth.c
@@
-92,10
+92,10
@@
int maestro(int argc, char *argv[])
gras_msg_handleall(5); /* friends, we're ready. Come and play */
if (xbt_dynar_length(group) < 2) {
gras_msg_handleall(5); /* friends, we're ready. Come and play */
if (xbt_dynar_length(group) < 2) {
-
CRITICAL1
("Not enough peers arrived. Expected 2 got %ld",
- xbt_dynar_length(group));
+
char *msg = bprintf
("Not enough peers arrived. Expected 2 got %ld",
+
xbt_dynar_length(group));
amok_pm_group_shutdown("bandwidth");
amok_pm_group_shutdown("bandwidth");
- xbt_
abort(
);
+ xbt_
die(msg
);
}
h1 = *(xbt_peer_t *) xbt_dynar_get_ptr(group, 0);
h2 = *(xbt_peer_t *) xbt_dynar_get_ptr(group, 1);
}
h1 = *(xbt_peer_t *) xbt_dynar_get_ptr(group, 0);
h2 = *(xbt_peer_t *) xbt_dynar_get_ptr(group, 1);