X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9696c1a327d9f7439c42d72097c9eec20afb3c4a..05898e1bb90bb5120653b524b08f296edec37a0e:/src/msg/deployment.c diff --git a/src/msg/deployment.c b/src/msg/deployment.c index 9874ee1ea2..50f5bbab80 100644 --- a/src/msg/deployment.c +++ b/src/msg/deployment.c @@ -54,13 +54,12 @@ static void parse_process_finalize(void) */ void MSG_launch_application(const char *file) { - MSG_global_init(); - surf_parse_reset_parser(); + xbt_assert0(msg_global,"MSG_global_init_args has to be called before MSG_launch_application."); STag_process_fun = parse_process_init; ETag_argument_fun = parse_argument; ETag_process_fun = parse_process_finalize; surf_parse_open(file); - surf_parse_lex(); + xbt_assert1((!surf_parse_lex()),"Parse error in %s",file); surf_parse_close(); } @@ -74,7 +73,7 @@ void MSG_launch_application(const char *file) */ void MSG_function_register(const char *name,m_process_code_t code) { - MSG_global_init(); + xbt_assert0(msg_global,"MSG_global_init_args has to be called before MSG_function_register."); xbt_dict_set(msg_global->registered_functions,name,code,NULL); } @@ -90,7 +89,7 @@ m_process_code_t MSG_get_registered_function(const char *name) { m_process_code_t code = NULL; - MSG_global_init(); + xbt_assert0(msg_global,"MSG_global_init_args has to be called before MSG_get_registered_function."); xbt_dict_get(msg_global->registered_functions,name,(void **) &code);