Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xin Wang
codes-dev
Commits
44561ddd
Commit
44561ddd
authored
Jan 08, 2015
by
Jonathan Jenkins
Browse files
tweaked config error handling
parent
03a26bd6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/models/networks/model-net/loggp.c
View file @
44561ddd
...
...
@@ -730,7 +730,7 @@ static void loggp_configure(){
const
char
*
anno
=
anno_map
->
annotations
[
i
];
int
rc
=
configuration_get_value_relpath
(
&
config
,
"PARAMS"
,
"net_config_file"
,
anno
,
config_file
,
MAX_NAME_LENGTH
);
if
(
rc
=
=
0
){
if
(
rc
<
=
0
){
tw_error
(
TW_LOC
,
"unable to read PARAMS:net_config_file@%s"
,
anno
);
}
...
...
@@ -739,7 +739,7 @@ static void loggp_configure(){
if
(
anno_map
->
has_unanno_lp
>
0
){
int
rc
=
configuration_get_value_relpath
(
&
config
,
"PARAMS"
,
"net_config_file"
,
NULL
,
config_file
,
MAX_NAME_LENGTH
);
if
(
rc
=
=
0
){
if
(
rc
<
=
0
){
tw_error
(
TW_LOC
,
"unable to read PARAMS:net_config_file"
);
}
loggp_set_params
(
config_file
,
&
all_params
[
anno_map
->
num_annos
]);
...
...
src/models/networks/model-net/simplep2p.c
View file @
44561ddd
...
...
@@ -867,7 +867,7 @@ static void sp_read_config(const char * anno, simplep2p_param *p){
int
rc
;
rc
=
configuration_get_value_relpath
(
&
config
,
"PARAMS"
,
"net_latency_ns_file"
,
anno
,
latency_file
,
MAX_NAME_LENGTH
);
if
(
rc
=
=
0
){
if
(
rc
<
=
0
){
if
(
anno
==
NULL
)
tw_error
(
TW_LOC
,
"simplep2p: unable to read PARAMS:net_latency_ns_file"
);
...
...
@@ -878,7 +878,7 @@ static void sp_read_config(const char * anno, simplep2p_param *p){
}
rc
=
configuration_get_value_relpath
(
&
config
,
"PARAMS"
,
"net_bw_mbps_file"
,
anno
,
bw_file
,
MAX_NAME_LENGTH
);
if
(
rc
=
=
0
){
if
(
rc
<
=
0
){
if
(
anno
==
NULL
)
tw_error
(
TW_LOC
,
"simplep2p: unable to read PARAMS:net_bw_mbps_file"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment