Beispiel #1
0
int main (int argc, char *argv[])
{
  int num_environment_files, next_env_file;
  struct dirent **environment_files;

#ifdef __linux__
  srandom ((int) time (NULL));
#else
  srandomdev ();
#endif

  if (! get_env_filenames (&environment_files, &num_environment_files))
    return 1;

  if (! create_result_directory ())
    return 1;

  if (! initialize_all_agents ())
    return 1;

  for (next_env_file = 0; next_env_file < num_environment_files; next_env_file++)
    {
      run_one_simulation (environment_files[next_env_file]);
    }

  release_all_agents ();

  return 0;
}
Beispiel #2
0
void __connman_agent_cleanup(void)
{
	DBG("");

	if (connection == NULL)
		return;

	if (agent_watch > 0)
		g_dbus_remove_watch(connection, agent_watch);

	release_all_agents();

	dbus_connection_unref(connection);
	connection = NULL;
}