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
Fix surf_storage execution
[simgrid.git]
/
src
/
include
/
surf
/
surf.h
diff --git
a/src/include/surf/surf.h
b/src/include/surf/surf.h
index
9566b4c
..
7ec4c48
100644
(file)
--- a/
src/include/surf/surf.h
+++ b/
src/include/surf/surf.h
@@
-335,7
+335,9
@@
static inline void *surf_workstation_resource_by_name(const char *name){
return xbt_lib_get_or_null(host_lib, name, SURF_WKS_LEVEL);
}
static inline void *surf_network_resource_by_name(const char *name){
return xbt_lib_get_or_null(host_lib, name, SURF_WKS_LEVEL);
}
static inline void *surf_network_resource_by_name(const char *name){
- return xbt_lib_get_or_null(link_lib, name, SURF_LINK_LEVEL);
+ network_element_t net_elm = xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL);
+ if(!net_elm) net_elm = xbt_lib_get_or_null(as_router_lib, name, ROUTING_ASR_LEVEL);
+ return net_elm;
}
static inline void *surf_storage_resource_by_name(const char *name){
return xbt_lib_get_or_null(storage_lib, name, SURF_STORAGE_LEVEL);
}
static inline void *surf_storage_resource_by_name(const char *name){
return xbt_lib_get_or_null(storage_lib, name, SURF_STORAGE_LEVEL);