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
Rewrite the way to do the parsing for host,cluster,peer,router and link.
[simgrid.git]
/
src
/
surf
/
network_ns3.c
diff --git
a/src/surf/network_ns3.c
b/src/surf/network_ns3.c
index
898f9c2
..
595dfc5
100644
(file)
--- a/
src/surf/network_ns3.c
+++ b/
src/surf/network_ns3.c
@@
-216,7
+216,9
@@
void parse_ns3_add_cluster(void)
if(host_src && host_dst){}
else xbt_die("\tns3_add_link from %d to %d",host_src->node_num,host_dst->node_num);
if(host_src && host_dst){}
else xbt_die("\tns3_add_link from %d to %d",host_src->node_num,host_dst->node_num);
- ns3_add_link(host_src->node_num,host_dst->node_num,bw,lat);
+ ns3_add_link(host_src->node_num,host_src->type,
+ host_dst->node_num,host_dst->type,
+ bw,lat);
free(router_id);
free(host_id);
free(router_id);
free(host_id);
@@
-302,7
+304,7
@@
void create_ns3_topology()
if(host_src && host_dst){}
else xbt_die("\tns3_add_link from %d to %d",host_src->node_num,host_dst->node_num);
if(host_src && host_dst){}
else xbt_die("\tns3_add_link from %d to %d",host_src->node_num,host_dst->node_num);
- ns3_add_link(host_src->node_num,host_
dst->node_num
,link_bdw,link_lat);
+ ns3_add_link(host_src->node_num,host_
src->type,host_dst->node_num,host_dst->type
,link_bdw,link_lat);
xbt_free(link_bdw);
xbt_free(link_lat);
xbt_free(link_bdw);
xbt_free(link_lat);
@@
-406,6
+408,7
@@
static void finalize(void)
{
ns3_finalize();
xbt_dynar_free_container(&IPV4addr);
{
ns3_finalize();
xbt_dynar_free_container(&IPV4addr);
+ xbt_dict_free(&dict_socket);
}
static double ns3_share_resources(double min)
}
static double ns3_share_resources(double min)
@@
-481,6
+484,7
@@
static void ns3_update_actions_state(double now, double delta)
if(ns3_get_socket_is_finished(data) == 1){
xbt_dynar_push(socket_to_destroy,&key);
if(ns3_get_socket_is_finished(data) == 1){
xbt_dynar_push(socket_to_destroy,&key);
+ XBT_DEBUG("Destroy socket %p of action %p", key, action);
action->generic_action.finish = now;
surf_action_state_set(&(action->generic_action), SURF_ACTION_DONE);
}
action->generic_action.finish = now;
surf_action_state_set(&(action->generic_action), SURF_ACTION_DONE);
}