/***************************************************************************
 *
 * Copyright (c) 2000, 2001 BalaBit IT Ltd, Budapest, Hungary
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * $Id: zorp.c,v 1.2.4.3 2001/09/19 19:22:17 bazsi Exp $
 *
 ***************************************************************************/

#include <zorp/zorp.h>
#include <zorp/log.h>
#include <zorp/cfg.h>

GMainLoop *main_loop;
gint exit_code = 0;

void
z_main_quit(int rc)
{
  exit_code = rc;
  g_main_quit(main_loop);
}

void
z_log_set_fake_session_id(gchar *instance_name)
{
  gchar tmp[256];

  (void) instance_name;
  if (z_config_str("firewall_name", tmp, sizeof(tmp)))
    {
      g_snprintf(fake_session_id, sizeof(fake_session_id), "(%s/nosession)", tmp);
    }
  else
    {
      strcpy(fake_session_id, "(noname/nosession)");
    }
}
