-/* $Id: zebraapi.c,v 1.201 2006-02-09 08:31:02 adam Exp $
+/* $Id: zebraapi.c,v 1.202 2006-02-21 15:23:11 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
const char *passwd_plain = 0;
const char *passwd_encrypt = 0;
const char *dbaccess = 0;
- ZebraService zh = xmalloc(sizeof(*zh));
+ ZebraService zh = 0;
if (configName)
- res_read_file(res, configName);
-
+ {
+ ZEBRA_RES ret = res_read_file(res, configName);
+ if (ret != ZEBRA_OK)
+ {
+ res_close(res);
+ return 0;
+ }
+ }
+ zh = xmalloc(sizeof(*zh));
zh->global_res = res;
zh->sessions = 0;
-# $Id: Makefile.am,v 1.31 2005-12-15 13:28:46 adam Exp $
+# $Id: Makefile.am,v 1.32 2006-02-21 15:23:11 adam Exp $
noinst_PROGRAMS = testclient
testclient_SOURCES = testclient.c
-simpletests = t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14
+simpletests = t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14
safaritests = safari1
check_PROGRAMS = $(simpletests) $(safaritests)
TESTS = $(check_PROGRAMS)
libtestlib_a_SOURCES = testlib.c testlib.h
+t0_SOURCES = t0.c
t1_SOURCES = t1.c
t2_SOURCES = t2.c
t3_SOURCES = t3.c
--- /dev/null
+/* $Id: t0.c,v 1.1 2006-02-21 15:23:11 adam Exp $
+ Copyright (C) 1995-2005
+ Index Data ApS
+
+This file is part of the Zebra server.
+
+Zebra 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, or (at your option) any later
+version.
+
+Zebra 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 Zebra; see the file LICENSE.zebra. If not, write to the
+Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+*/
+
+/** t0 - test zebra_start .. */
+
+#include <stdlib.h>
+#include "testlib.h"
+
+int main(int argc, char **argv)
+{
+ ZebraService zs;
+
+ start_log(argc, argv);
+
+ zs = zebra_start("xxxxpoiasdfasfd.cfg");
+ if (zs)
+ exit(1);
+ return 0;
+}