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
Try to activate coverity for simgrid
[simgrid.git]
/
examples
/
msg
/
bittorrent
/
bittorrent_platfgen.c
diff --git
a/examples/msg/bittorrent/bittorrent_platfgen.c
b/examples/msg/bittorrent/bittorrent_platfgen.c
index
8fac6a1
..
16c0e65
100644
(file)
--- a/
examples/msg/bittorrent/bittorrent_platfgen.c
+++ b/
examples/msg/bittorrent/bittorrent_platfgen.c
@@
-1,11
+1,13
@@
-/* Copyright (c) 2012. The SimGrid Team.
+/* Copyright (c) 2012
-2015
. The SimGrid Team.
* All rights reserved. */
* All rights reserved. */
+
/* 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. */
/* 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. */
+
#include "bittorrent.h"
#include "peer.h"
#include "tracker.h"
#include "bittorrent.h"
#include "peer.h"
#include "tracker.h"
-#include <
msg
/msg.h>
+#include <
simgrid
/msg.h>
#include <simgrid/platf_generator.h>
/**
* Bittorrent example launcher, using a generated platform
#include <simgrid/platf_generator.h>
/**
* Bittorrent example launcher, using a generated platform
@@
-30,12
+32,13
@@
void promoter(context_node_t node)
host_parameters.id = NULL;
//Power from 3,000,000 to 10,000,000
host_parameters.id = NULL;
//Power from 3,000,000 to 10,000,000
- host_parameters.power_peak =
- 7000000 * RngStream_RandU01(rng_stream) + 3000000;
+ host_parameters.speed_peak = xbt_dynar_new(sizeof(double), NULL);
+ xbt_dynar_push_as(host_parameters.speed_peak, double,
+ 7000000 * RngStream_RandU01(rng_stream) + 3000000.0);
host_parameters.core_amount = 1;
host_parameters.core_amount = 1;
- host_parameters.
power
_scale = 1;
- host_parameters.
power
_trace = NULL;
- host_parameters.initial
_state = SURF_RESOURCE_ON
;
+ host_parameters.
speed
_scale = 1;
+ host_parameters.
speed
_trace = NULL;
+ host_parameters.initial
lyOn = 1
;
host_parameters.state_trace = NULL;
host_parameters.coord = NULL;
host_parameters.properties = NULL;
host_parameters.state_trace = NULL;
host_parameters.coord = NULL;
host_parameters.properties = NULL;
@@
-57,7
+60,7
@@
void labeler(context_edge_t edge)
//Latency from 0ms to 100ms
link_parameters.latency = RngStream_RandU01(rng_stream) / 10.0;
link_parameters.latency_trace = NULL;
//Latency from 0ms to 100ms
link_parameters.latency = RngStream_RandU01(rng_stream) / 10.0;
link_parameters.latency_trace = NULL;
- link_parameters.
state = SURF_RESOURCE_ON
;
+ link_parameters.
initiallyOn = 1
;
link_parameters.state_trace = NULL;
link_parameters.policy = SURF_LINK_SHARED;
link_parameters.properties = NULL;
link_parameters.state_trace = NULL;
link_parameters.policy = SURF_LINK_SHARED;
link_parameters.properties = NULL;