char **myargv=argv;
int myargc=argc;
int i;
+ int retcode;
if (gras_log) {
myargv=malloc((argc+1) * sizeof(char**));
myargv[i] = argv[i];
myargv[myargc++] = gras_log;
}
- $_(myargc,myargv);
+ retcode = $_(myargc,myargv);
if (myargv != argv)
free(myargv);
- return 0;
+ return retcode;
}
EOF
/* Simulation setup */
MSG_global_init();
MSG_set_verbosity(MSG_SILENT);
- MSG_set_channel_number(GRAS_MAX_CHANNEL);
+ MSG_set_channel_number(10); // GRAS_MAX_CHANNEL hardcoded since Alvin killed its definition
MSG_create_environment(argv[1]);
/* Application deployment */
/* Run the simulation */
MSG_main();
+ /* cleanup the place */
+ MSG_clean();
if (gras_log)
free(gras_log);
return 0;