euclidean_dist = sqrt (eculidean_dist_comp(0,src_ctn,dst_ctn)+eculidean_dist_comp(1,src_ctn,dst_ctn))
+fabs(atof(xbt_dynar_get_as(src_ctn, 2, char *)))+fabs(atof(xbt_dynar_get_as(dst_ctn, 2, char *)));
euclidean_dist = sqrt (eculidean_dist_comp(0,src_ctn,dst_ctn)+eculidean_dist_comp(1,src_ctn,dst_ctn))
+fabs(atof(xbt_dynar_get_as(src_ctn, 2, char *)))+fabs(atof(xbt_dynar_get_as(dst_ctn, 2, char *)));
- xbt_assert2(euclidean_dist>=0, "Euclidean Dist is less than 0\"%s\" and \"%.2f\"", src, euclidean_dist);
+ xbt_assert(euclidean_dist>=0, "Euclidean Dist is less than 0\"%s\" and \"%.2f\"", src, euclidean_dist);
network_element_info_t info = NULL;
if (current_routing->hierarchy == SURF_ROUTING_NULL)
current_routing->hierarchy = SURF_ROUTING_BASE;
network_element_info_t info = NULL;
if (current_routing->hierarchy == SURF_ROUTING_NULL)
current_routing->hierarchy = SURF_ROUTING_BASE;
- xbt_assert1(!xbt_lib_get_or_null(host_lib, host_id,ROUTING_HOST_LEVEL),
+ xbt_assert(!xbt_lib_get_or_null(host_lib, host_id,ROUTING_HOST_LEVEL),
"no defined method \"set_processing_unit\" in \"%s\"",
current_routing->name);
(*(current_routing->set_processing_unit)) (current_routing, host_id);
"no defined method \"set_processing_unit\" in \"%s\"",
current_routing->name);
(*(current_routing->set_processing_unit)) (current_routing, host_id);
- xbt_assert1(!xbt_lib_get_or_null(as_router_lib,A_surfxml_router_id, ROUTING_ASR_LEVEL),
+ xbt_assert(!xbt_lib_get_or_null(as_router_lib,A_surfxml_router_id, ROUTING_ASR_LEVEL),
"no defined method \"set_processing_unit\" in \"%s\"",
current_routing->name);
(*(current_routing->set_processing_unit)) (current_routing,
"no defined method \"set_processing_unit\" in \"%s\"",
current_routing->name);
(*(current_routing->set_processing_unit)) (current_routing,
static void parse_S_route_new_and_endpoints(const char *src_id, const char *dst_id)
{
if (src != NULL && dst != NULL && link_list != NULL)
static void parse_S_route_new_and_endpoints(const char *src_id, const char *dst_id)
{
if (src != NULL && dst != NULL && link_list != NULL)
- THROW2(arg_error, 0, "Route between %s to %s can not be defined",
+ THROWF(arg_error, 0, "Route between %s to %s can not be defined",
"Some limits are null in the route between \"%s\" and \"%s\"",
src, dst);
link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
"Some limits are null in the route between \"%s\" and \"%s\"",
src, dst);
link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
static void parse_S_ASroute_new_and_endpoints(void)
{
if (src != NULL && dst != NULL && link_list != NULL)
static void parse_S_ASroute_new_and_endpoints(void)
{
if (src != NULL && dst != NULL && link_list != NULL)
- THROW2(arg_error, 0, "Route between %s to %s can not be defined",
+ THROWF(arg_error, 0, "Route between %s to %s can not be defined",
A_surfxml_ASroute_src, A_surfxml_ASroute_dst);
src = A_surfxml_ASroute_src;
dst = A_surfxml_ASroute_dst;
gw_src = A_surfxml_ASroute_gw_src;
gw_dst = A_surfxml_ASroute_gw_dst;
A_surfxml_ASroute_src, A_surfxml_ASroute_dst);
src = A_surfxml_ASroute_src;
dst = A_surfxml_ASroute_dst;
gw_src = A_surfxml_ASroute_gw_src;
gw_dst = A_surfxml_ASroute_gw_dst;
static void parse_S_bypassRoute_new_and_endpoints(void)
{
if (src != NULL && dst != NULL && link_list != NULL)
static void parse_S_bypassRoute_new_and_endpoints(void)
{
if (src != NULL && dst != NULL && link_list != NULL)
"Bypass Route between %s to %s can not be defined",
A_surfxml_bypassRoute_src, A_surfxml_bypassRoute_dst);
src = A_surfxml_bypassRoute_src;
dst = A_surfxml_bypassRoute_dst;
gw_src = A_surfxml_bypassRoute_gw_src;
gw_dst = A_surfxml_bypassRoute_gw_dst;
"Bypass Route between %s to %s can not be defined",
A_surfxml_bypassRoute_src, A_surfxml_bypassRoute_dst);
src = A_surfxml_bypassRoute_src;
dst = A_surfxml_bypassRoute_dst;
gw_src = A_surfxml_bypassRoute_gw_src;
gw_dst = A_surfxml_bypassRoute_gw_dst;
{
name_route_extended_t route = xbt_new0(s_name_route_extended_t, 1);
route->generic_route.link_list = link_list;
{
name_route_extended_t route = xbt_new0(s_name_route_extended_t, 1);
route->generic_route.link_list = link_list;
"no defined method \"set_route\" in \"%s\"",
current_routing->name);
(*(current_routing->set_route)) (current_routing, src, dst, route);
"no defined method \"set_route\" in \"%s\"",
current_routing->name);
(*(current_routing->set_route)) (current_routing, src, dst, route);
e_route->generic_route.link_list = link_list;
e_route->src_gateway = xbt_strdup(gw_src);
e_route->dst_gateway = xbt_strdup(gw_dst);
e_route->generic_route.link_list = link_list;
e_route->src_gateway = xbt_strdup(gw_src);
e_route->dst_gateway = xbt_strdup(gw_dst);
"no defined method \"set_ASroute\" in \"%s\"",
current_routing->name);
(*(current_routing->set_ASroute)) (current_routing, src, dst, e_route);
"no defined method \"set_ASroute\" in \"%s\"",
current_routing->name);
(*(current_routing->set_ASroute)) (current_routing, src, dst, e_route);
e_route->generic_route.link_list = link_list;
e_route->src_gateway = xbt_strdup(gw_src);
e_route->dst_gateway = xbt_strdup(gw_dst);
e_route->generic_route.link_list = link_list;
e_route->src_gateway = xbt_strdup(gw_src);
e_route->dst_gateway = xbt_strdup(gw_dst);
"no defined method \"set_bypassroute\" in \"%s\"",
current_routing->name);
(*(current_routing->set_bypassroute)) (current_routing, src, dst,
"no defined method \"set_bypassroute\" in \"%s\"",
current_routing->name);
(*(current_routing->set_bypassroute)) (current_routing, src, dst,
(current_routing->routing_sons, AS_id),
"The AS \"%s\" already exists", AS_id);
/* it is a part of the tree */
(current_routing->routing_sons, AS_id),
"The AS \"%s\" already exists", AS_id);
/* it is a part of the tree */
if (strcmp(A_surfxml_AS_coordinates,"")) {
if(!COORD_ASR_LEVEL) xbt_die("To use coordinates, you must set configuration 'coordinates' to 'yes'");
if (strcmp(A_surfxml_AS_coordinates,"")) {
if(!COORD_ASR_LEVEL) xbt_die("To use coordinates, you must set configuration 'coordinates' to 'yes'");
xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_AS_coordinates, " ");
xbt_dynar_shrink(ctn, 0);
xbt_lib_set(as_router_lib,A_surfxml_AS_id,COORD_ASR_LEVEL,(void *) ctn);
xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_AS_coordinates, " ");
xbt_dynar_shrink(ctn, 0);
xbt_lib_set(as_router_lib,A_surfxml_AS_id,COORD_ASR_LEVEL,(void *) ctn);
- THROW1(arg_error, 0, "Close AS(%s), that never open", AS_id);
+ THROWF(arg_error, 0, "Close AS(%s), that never open", AS_id);
- xbt_assert1(!xbt_lib_get_or_null(as_router_lib,current_routing->name, ROUTING_ASR_LEVEL),
+ xbt_assert(!xbt_lib_get_or_null(as_router_lib,current_routing->name, ROUTING_ASR_LEVEL),
"The AS \"%s\" already exists",current_routing->name);
info = xbt_new0(s_network_element_info_t, 1);
info->rc_component = current_routing->routing_father;
"The AS \"%s\" already exists",current_routing->name);
info = xbt_new0(s_network_element_info_t, 1);
info->rc_component = current_routing->routing_father;
src_as = ((network_element_info_t)src_data)->rc_component;
dst_as = ((network_element_info_t)dst_data)->rc_component;
src_as = ((network_element_info_t)src_data)->rc_component;
dst_as = ((network_element_info_t)dst_data)->rc_component;
route_extended_t e_route, e_route_cnt, e_route_src = NULL, e_route_dst =
NULL;
route_extended_t e_route, e_route_cnt, e_route_src = NULL, e_route_dst =
NULL;
- xbt_assert2(e_route_cnt, "no route between \"%s\" and \"%s\"", src,
+ xbt_assert(e_route_cnt, "no route between \"%s\" and \"%s\"", src,
dst);
xbt_dynar_foreach(e_route_cnt->generic_route.link_list, cpt, link) {
xbt_dynar_push(e_route->generic_route.link_list, &link);
dst);
xbt_dynar_foreach(e_route_cnt->generic_route.link_list, cpt, link) {
xbt_dynar_push(e_route->generic_route.link_list, &link);
(e_route_cnt->dst_gateway == NULL),
"bad gateway for route between \"%s\" and \"%s\"", src,
dst);
if (strcmp(src, e_route_cnt->src_gateway)) {
e_route_src = _get_route(src, e_route_cnt->src_gateway);
(e_route_cnt->dst_gateway == NULL),
"bad gateway for route between \"%s\" and \"%s\"", src,
dst);
if (strcmp(src, e_route_cnt->src_gateway)) {
e_route_src = _get_route(src, e_route_cnt->src_gateway);
- xbt_assert2(e_route_src, "no route between \"%s\" and \"%s\"", src,
+ xbt_assert(e_route_src, "no route between \"%s\" and \"%s\"", src,
e_route_cnt->src_gateway);
xbt_dynar_foreach(e_route_src->generic_route.link_list, cpt, link) {
xbt_dynar_push(e_route->generic_route.link_list, &link);
e_route_cnt->src_gateway);
xbt_dynar_foreach(e_route_src->generic_route.link_list, cpt, link) {
xbt_dynar_push(e_route->generic_route.link_list, &link);
if (strcmp(e_route_cnt->dst_gateway, dst)) {
e_route_dst = _get_route(e_route_cnt->dst_gateway, dst);
if (strcmp(e_route_cnt->dst_gateway, dst)) {
e_route_dst = _get_route(e_route_cnt->dst_gateway, dst);
e_route_cnt->dst_gateway, dst);
xbt_dynar_foreach(e_route_dst->generic_route.link_list, cpt, link) {
xbt_dynar_push(e_route->generic_route.link_list, &link);
e_route_cnt->dst_gateway, dst);
xbt_dynar_foreach(e_route_dst->generic_route.link_list, cpt, link) {
xbt_dynar_push(e_route->generic_route.link_list, &link);
double latency, latency_src, latency_dst = 0.0;
XBT_DEBUG("Solve route \"%s\" to \"%s\"", src, dst);
double latency, latency_src, latency_dst = 0.0;
XBT_DEBUG("Solve route \"%s\" to \"%s\"", src, dst);
- xbt_assert2(latency>=0, "no route between \"%s\" and \"%s\"", src,
+ xbt_assert(latency>=0, "no route between \"%s\" and \"%s\"", src,
(e_route_cnt->dst_gateway == NULL),
"bad gateway for route between \"%s\" and \"%s\"", src,
dst);
(e_route_cnt->dst_gateway == NULL),
"bad gateway for route between \"%s\" and \"%s\"", src,
dst);
src_father->name, dst_father->name);
if (src != e_route_cnt->src_gateway) {
latency_src = _get_latency(src, e_route_cnt->src_gateway);
src_father->name, dst_father->name);
if (src != e_route_cnt->src_gateway) {
latency_src = _get_latency(src, e_route_cnt->src_gateway);
- xbt_assert2(latency_src>=0, "no route between \"%s\" and \"%s\"", src,
+ xbt_assert(latency_src>=0, "no route between \"%s\" and \"%s\"", src,
if (e_route_cnt->dst_gateway != dst) {
latency_dst = _get_latency(e_route_cnt->dst_gateway, dst);
if (e_route_cnt->dst_gateway != dst) {
latency_dst = _get_latency(e_route_cnt->dst_gateway, dst);
- xbt_assert2(e_route, "no route between \"%s\" and \"%s\"", src, dst);
+ xbt_assert(e_route, "no route between \"%s\" and \"%s\"", src, dst);
- xbt_assert2(latency>=0.0, "no route between \"%s\" and \"%s\"", src, dst);
+ xbt_assert(latency>=0.0, "no route between \"%s\" and \"%s\"", src, dst);
xbt_dict_foreach(routing->generic_routing.to_index, c2, k2, d2) {
int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, k1);
int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, k2);
xbt_dict_foreach(routing->generic_routing.to_index, c2, k2, d2) {
int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, k1);
int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, k2);
static route_extended_t full_get_route(routing_component_t rc,
const char *src, const char *dst)
{
static route_extended_t full_get_route(routing_component_t rc,
const char *src, const char *dst)
{
generic_src_dst_check(rc, src, dst);
int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, src);
int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, dst);
generic_src_dst_check(rc, src, dst);
int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, src);
int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, dst);
routing_component_full_t routing = ((routing_component_full_t) rc);
size_t table_size = xbt_dict_length(routing->generic_routing.to_index);
routing_component_full_t routing = ((routing_component_full_t) rc);
size_t table_size = xbt_dict_length(routing->generic_routing.to_index);
&& dst_id, "Network elements %s or %s not found", src, dst);
&& dst_id, "Network elements %s or %s not found", src, dst);
"Invalid count of links, must be greater than zero (%s,%s)",
src, dst);
"Invalid count of links, must be greater than zero (%s,%s)",
src, dst);
xbt_dynar_foreach(route->generic_route.link_list,i,link_name)
{
void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
xbt_dynar_foreach(route->generic_route.link_list,i,link_name)
{
void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
(void*)TO_ROUTE_FULL(*src_id, *dst_id)->generic_route.link_list,
(void*)link_route_to_test,
(int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
(void*)TO_ROUTE_FULL(*src_id, *dst_id)->generic_route.link_list,
(void*)link_route_to_test,
(int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
- char *gw_src = xbt_strdup(route->src_gateway);
- char *gw_dst = xbt_strdup(route->dst_gateway);
- route->src_gateway = gw_dst;
- route->dst_gateway = gw_src;
+ char *gw_tmp ;
+ gw_tmp = route->src_gateway;
+ route->src_gateway = route->dst_gateway;
+ route->dst_gateway = gw_tmp;
{
link_name = xbt_dynar_get_as(route->generic_route.link_list,i-1,void *);
void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
{
link_name = xbt_dynar_get_as(route->generic_route.link_list,i-1,void *);
void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
(void*)TO_ROUTE_FULL(*dst_id, *src_id)->generic_route.link_list,
(void*)link_route_to_test,
(int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
(void*)TO_ROUTE_FULL(*dst_id, *src_id)->generic_route.link_list,
(void*)link_route_to_test,
(int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
TO_ROUTE_FULL(*dst_id, *src_id) = generic_new_extended_route(rc->hierarchy,route,0);
xbt_dynar_shrink(TO_ROUTE_FULL(*dst_id, *src_id)->generic_route.link_list, 0);
}
TO_ROUTE_FULL(*dst_id, *src_id) = generic_new_extended_route(rc->hierarchy,route,0);
xbt_dynar_shrink(TO_ROUTE_FULL(*dst_id, *src_id)->generic_route.link_list, 0);
}
static route_extended_t floyd_get_route(routing_component_t rc,
const char *src, const char *dst)
{
static route_extended_t floyd_get_route(routing_component_t rc,
const char *src, const char *dst)
{
generic_src_dst_check(rc, src, dst);
int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, src);
int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, dst);
generic_src_dst_check(rc, src, dst);
int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, src);
int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, dst);
pred = TO_FLOYD_PRED(*src_id, pred);
if (pred == -1) /* if no pred in route -> no route to host */
break;
pred = TO_FLOYD_PRED(*src_id, pred);
if (pred == -1) /* if no pred in route -> no route to host */
break;
&& strcmp(gw_dst, prev_gw_src)) {
xbt_dynar_t e_route_as_to_as =
(*(global_routing->get_route)) (gw_dst, prev_gw_src);
&& strcmp(gw_dst, prev_gw_src)) {
xbt_dynar_t e_route_as_to_as =
(*(global_routing->get_route)) (gw_dst, prev_gw_src);
*src_id, *dst_id, src, dst);
if (rc->hierarchy == SURF_ROUTING_RECURSIVE) {
*src_id, *dst_id, src, dst);
if (rc->hierarchy == SURF_ROUTING_RECURSIVE) {
xbt_dynar_foreach(route->generic_route.link_list,cpt,link_name)
{
void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
xbt_dynar_foreach(route->generic_route.link_list,cpt,link_name)
{
void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
(void*)TO_FLOYD_LINK(*src_id, *dst_id)->generic_route.link_list,
(void*)link_route_to_test,
(int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
(void*)TO_FLOYD_LINK(*src_id, *dst_id)->generic_route.link_list,
(void*)link_route_to_test,
(int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
{
link_name = xbt_dynar_get_as(route->generic_route.link_list,i-1,void *);
void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
{
link_name = xbt_dynar_get_as(route->generic_route.link_list,i-1,void *);
void *link = xbt_lib_get_or_null(link_lib, link_name, SURF_LINK_LEVEL);
(void*)TO_FLOYD_LINK(*dst_id, *src_id)->generic_route.link_list,
(void*)link_route_to_test,
(int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
(void*)TO_FLOYD_LINK(*dst_id, *src_id)->generic_route.link_list,
(void*)link_route_to_test,
(int_f_cpvoid_cpvoid_t) surf_pointer_resource_cmp),
generic_src_dst_check(rc, src, dst);
int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, src);
int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, dst);
generic_src_dst_check(rc, src, dst);
int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, src);
int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, dst);
graph_node_map_search(routing, *src_id);
graph_node_map_element_t dst_elm =
graph_node_map_search(routing, *dst_id);
graph_node_map_search(routing, *src_id);
graph_node_map_element_t dst_elm =
graph_node_map_search(routing, *dst_id);
&& dst_elm != NULL, "src %d or dst %d does not exist",
*src_id, *dst_id);
src_node_id = ((graph_node_data_t)
&& dst_elm != NULL, "src %d or dst %d does not exist",
*src_id, *dst_id);
src_node_id = ((graph_node_data_t)
- xbt_assert2(edge != NULL, "no route between host %d and %d", *src_id,
+ xbt_assert(edge != NULL, "no route between host %d and %d", *src_id,
- xbt_assert2(edge != NULL, "no route between host %d and %d", *src_id,
+ xbt_assert(edge != NULL, "no route between host %d and %d", *src_id,
&& strcmp(gw_dst, prev_gw_src)) {
xbt_dynar_t e_route_as_to_as =
(*(global_routing->get_route)) (gw_dst, prev_gw_src);
&& strcmp(gw_dst, prev_gw_src)) {
xbt_dynar_t e_route_as_to_as =
(*(global_routing->get_route)) (gw_dst, prev_gw_src);
const char *error;
int erroffset;
ruleroute->re_src = pcre_compile(src, 0, &error, &erroffset, NULL);
const char *error;
int erroffset;
ruleroute->re_src = pcre_compile(src, 0, &error, &erroffset, NULL);
"PCRE compilation failed at offset %d (\"%s\"): %s\n",
erroffset, src, error);
ruleroute->re_dst = pcre_compile(dst, 0, &error, &erroffset, NULL);
"PCRE compilation failed at offset %d (\"%s\"): %s\n",
erroffset, src, error);
ruleroute->re_dst = pcre_compile(dst, 0, &error, &erroffset, NULL);
"PCRE compilation failed at offset %d (\"%s\"): %s\n",
erroffset, dst, error);
ruleroute->re_str_link = route->generic_route.link_list;
"PCRE compilation failed at offset %d (\"%s\"): %s\n",
erroffset, dst, error);
ruleroute->re_str_link = route->generic_route.link_list;
int erroffset;
ruleroute_e->generic_rule_route.re_src =
pcre_compile(src, 0, &error, &erroffset, NULL);
int erroffset;
ruleroute_e->generic_rule_route.re_src =
pcre_compile(src, 0, &error, &erroffset, NULL);
"PCRE compilation failed at offset %d (\"%s\"): %s\n",
erroffset, src, error);
ruleroute_e->generic_rule_route.re_dst =
pcre_compile(dst, 0, &error, &erroffset, NULL);
"PCRE compilation failed at offset %d (\"%s\"): %s\n",
erroffset, src, error);
ruleroute_e->generic_rule_route.re_dst =
pcre_compile(dst, 0, &error, &erroffset, NULL);
"PCRE compilation failed at offset %d (\"%s\"): %s\n",
erroffset, dst, error);
ruleroute_e->generic_rule_route.re_str_link =
"PCRE compilation failed at offset %d (\"%s\"): %s\n",
erroffset, dst, error);
ruleroute_e->generic_rule_route.re_str_link =
"bad string parameter, no number indication, at offset: %d (\"%s\")",
i, value);
// solve number
number = atoi(value + i);
i = i + number_length;
"bad string parameter, no number indication, at offset: %d (\"%s\")",
i, value);
// solve number
number = atoi(value + i);
i = i + number_length;
"bad string parameter, too few chars, at offset: %d (\"%s\")",
i, value);
"bad string parameter, too few chars, at offset: %d (\"%s\")",
i, value);
"bad string parameter, not enough length param_size, at offset: %d (\"%s\") %d %d",
i, value, param_size, number);
"bad string parameter, not enough length param_size, at offset: %d (\"%s\") %d %d",
i, value, param_size, number);
"solving string \"%s\", small buffer size (%d)", value,
BUFFER_SIZE);
result_result[i_result_buffer] = 0;
"solving string \"%s\", small buffer size (%d)", value,
BUFFER_SIZE);
result_result[i_result_buffer] = 0;
ovector_dst, OVECCOUNT);
if (rc_dst >= 0) {
res = pcre_get_substring_list(src, ovector_src, rc_src, &list_src);
ovector_dst, OVECCOUNT);
if (rc_dst >= 0) {
res = pcre_get_substring_list(src, ovector_src, rc_src, &list_src);
res = pcre_get_substring_list(dst, ovector_dst, rc_dst, &list_dst);
res = pcre_get_substring_list(dst, ovector_dst, rc_dst, &list_dst);
- THROW1(mismatch_error, 0, "Link %s not found", new_link_name);
+ THROWF(mismatch_error, 0, "Link %s not found", new_link_name);
"Invalid count of links, must be greater than zero (%s,%s)",
src, dst);
"Invalid count of links, must be greater than zero (%s,%s)",
src, dst);
"The bypass route between \"%s\"(\"%s\") and \"%s\"(\"%s\") already exists",
src, e_route->src_gateway, dst, e_route->dst_gateway);
"The bypass route between \"%s\"(\"%s\") and \"%s\"(\"%s\") already exists",
src, e_route->src_gateway, dst, e_route->dst_gateway);
- THROW1(mismatch_error, 0, "Link %s not found", link_name);
+ THROWF(mismatch_error, 0, "Link %s not found", link_name);
|| hierarchy == SURF_ROUTING_RECURSIVE,
"the hierarchy type is not defined");
|| hierarchy == SURF_ROUTING_RECURSIVE,
"the hierarchy type is not defined");
&& e_route->dst_gateway, "bad gateway, is null");
links = e_route->generic_route.link_list;
/* remeber not erase the gateway names */
&& e_route->dst_gateway, "bad gateway, is null");
links = e_route->generic_route.link_list;
/* remeber not erase the gateway names */
- new_e_route->src_gateway = e_route->src_gateway;
- new_e_route->dst_gateway = e_route->dst_gateway;
+ new_e_route->src_gateway = strdup(e_route->src_gateway);
+ new_e_route->dst_gateway = strdup(e_route->dst_gateway);
- THROW1(mismatch_error, 0, "Link %s not found", link_name);
+ THROWF(mismatch_error, 0, "Link %s not found", link_name);
char *host_id = NULL;
char *router_id, *link_router, *link_backbone, *link_id_up, *link_id_down;
char *host_id = NULL;
char *router_id, *link_router, *link_backbone, *link_id_up, *link_id_down;
static unsigned int surfxml_buffer_stack_stack_ptr = 1;
static unsigned int surfxml_buffer_stack_stack[1024];
static unsigned int surfxml_buffer_stack_stack_ptr = 1;
static unsigned int surfxml_buffer_stack_stack[1024];
SURFXML_BUFFER_SET(AS_id, peer_id);
SURFXML_BUFFER_SET(AS_coordinates, peer_coord);
SURFXML_BUFFER_SET(AS_id, peer_id);
SURFXML_BUFFER_SET(AS_coordinates, peer_coord);
SURFXML_BUFFER_SET(AS_routing, "Full");
XBT_DEBUG("<AS id=\"%s\"\trouting=\"Full\">", peer_id);
SURFXML_BUFFER_SET(AS_routing, "Full");
XBT_DEBUG("<AS id=\"%s\"\trouting=\"Full\">", peer_id);
XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id_up, peer_bw_in, peer_lat);
A_surfxml_link_state = A_surfxml_link_state_ON;
A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id_up, peer_bw_in, peer_lat);
A_surfxml_link_state = A_surfxml_link_state_ON;
A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
SURFXML_BUFFER_SET(link_id, link_id_up);
SURFXML_BUFFER_SET(link_bandwidth, peer_bw_in);
SURFXML_BUFFER_SET(link_latency, peer_lat);
SURFXML_BUFFER_SET(link_id, link_id_up);
SURFXML_BUFFER_SET(link_bandwidth, peer_bw_in);
SURFXML_BUFFER_SET(link_latency, peer_lat);
XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id_down, peer_bw_out, peer_lat);
A_surfxml_link_state = A_surfxml_link_state_ON;
A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
XBT_DEBUG("<link\tid=\"%s\"\tbw=\"%s\"\tlat=\"%s\"/>", link_id_down, peer_bw_out, peer_lat);
A_surfxml_link_state = A_surfxml_link_state_ON;
A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_SHARED;
SURFXML_BUFFER_SET(link_id, link_id_down);
SURFXML_BUFFER_SET(link_bandwidth, peer_bw_out);
SURFXML_BUFFER_SET(link_latency, peer_lat);
SURFXML_BUFFER_SET(link_id, link_id_down);
SURFXML_BUFFER_SET(link_bandwidth, peer_bw_out);
SURFXML_BUFFER_SET(link_latency, peer_lat);
SURFXML_BUFFER_SET(route_dst, router_id);
A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
SURFXML_START_TAG(route);
SURFXML_BUFFER_SET(route_dst, router_id);
A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
SURFXML_START_TAG(route);
XBT_DEBUG("<link_ctn\tid=\"%s\"/>", link_id_up);
SURFXML_BUFFER_SET(link_ctn_id, link_id_up);
A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
XBT_DEBUG("<link_ctn\tid=\"%s\"/>", link_id_up);
SURFXML_BUFFER_SET(link_ctn_id, link_id_up);
A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
XBT_DEBUG("symmetrical=\"NO\">");
SURFXML_BUFFER_SET(route_src, router_id);
XBT_DEBUG("symmetrical=\"NO\">");
SURFXML_BUFFER_SET(route_src, router_id);
A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
SURFXML_START_TAG(route);
XBT_DEBUG("<link_ctn\tid=\"%s\"/>", link_id_down);
SURFXML_BUFFER_SET(link_ctn_id, link_id_down);
A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
A_surfxml_route_symmetrical = A_surfxml_route_symmetrical_NO;
SURFXML_START_TAG(route);
XBT_DEBUG("<link_ctn\tid=\"%s\"/>", link_id_down);
SURFXML_BUFFER_SET(link_ctn_id, link_id_down);
A_surfxml_link_ctn_direction = A_surfxml_link_ctn_direction_NONE;
- THROW2(arg_error, 0, "random->max < random->min (%f < %f)", max, min);
+ THROWF(arg_error, 0, "random->max < random->min (%f < %f)", max, min);
- THROW2(arg_error, 0, "random->mean < random->min (%f < %f)", mean,
+ THROWF(arg_error, 0, "random->mean < random->min (%f < %f)", mean,
- THROW2(arg_error, 0, "random->mean > random->max (%f > %f)", mean,
+ THROWF(arg_error, 0, "random->mean > random->max (%f > %f)", mean,
- THROW2(arg_error, 0, "Invalid mean and standard deviation (%f and %f)",
+ THROWF(arg_error, 0, "Invalid mean and standard deviation (%f and %f)",
random->mean, random->std);
XBT_DEBUG("id = '%s' min = '%f' max = '%f' mean = '%f' std_deviatinon = '%f' generator = '%d' seed = '%ld' radical = '%s'",
random->mean, random->std);
XBT_DEBUG("id = '%s' min = '%f' max = '%f' mean = '%f' std_deviatinon = '%f' generator = '%d' seed = '%ld' radical = '%s'",
radical_ends = xbt_str_split(groups, "-");
switch (xbt_dynar_length(radical_ends)) {
case 1:
radical_ends = xbt_str_split(groups, "-");
switch (xbt_dynar_length(radical_ends)) {
case 1:
- xbt_assert1(!xbt_dict_get_or_null(random_value,random_id),"Custom Random '%s' already exists !",random_id);
+ xbt_assert(!xbt_dict_get_or_null(random_value,random_id),"Custom Random '%s' already exists !",random_id);
res = random_generate(random);
tmpbuf = bprintf("%s%d",random_id,atoi(xbt_dynar_getfirst_as(radical_ends,char *)));
xbt_dict_set(random_value, tmpbuf, bprintf("%f",res), free);
res = random_generate(random);
tmpbuf = bprintf("%s%d",random_id,atoi(xbt_dynar_getfirst_as(radical_ends,char *)));
xbt_dict_set(random_value, tmpbuf, bprintf("%f",res), free);
xbt_dynar_get_as(radical_ends, 0, char *));
surf_parse_get_int(&end, xbt_dynar_get_as(radical_ends, 1, char *));
for (i = start; i <= end; i++) {
xbt_dynar_get_as(radical_ends, 0, char *));
surf_parse_get_int(&end, xbt_dynar_get_as(radical_ends, 1, char *));
for (i = start; i <= end; i++) {
- xbt_assert1(!xbt_dict_get_or_null(random_value,random_id),"Custom Random '%s' already exists !",bprintf("%s%d",random_id,i));
+ xbt_assert(!xbt_dict_get_or_null(random_value,random_id),"Custom Random '%s' already exists !",bprintf("%s%d",random_id,i));
res = random_generate(random);
tmpbuf = bprintf("%s%d",random_id,i);
xbt_dict_set(random_value, tmpbuf, bprintf("%f",res), free);
res = random_generate(random);
tmpbuf = bprintf("%s%d",random_id,i);
xbt_dict_set(random_value, tmpbuf, bprintf("%f",res), free);