-/* $Id: main.c,v 1.129 2006-05-10 08:13:22 adam Exp $
- Copyright (C) 1995-2005
+/* $Id: main.c,v 1.131 2006-09-11 22:57:54 adam Exp $
+ Copyright (C) 1995-2006
Index Data ApS
This file is part of the Zebra server.
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.
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
*/
#include <stdio.h>
}
if (res != ZEBRA_OK)
{
- yaz_log(YLOG_WARN, "Operation failed");
+ const char *add = zebra_errAdd(zh);
+ yaz_log(YLOG_FATAL, "Operation failed: %s %s",
+ zebra_errString(zh), add ? add : "");
+
+ if (trans_started)
+ if (zebra_end_trans (zh) != ZEBRA_OK)
+ yaz_log (YLOG_WARN, "zebra_end_trans failed");
+
+
+ zebra_close (zh);
+ zebra_stop (zs);
exit(1);
}
log_event_end (NULL, NULL);
else if (ret == 'V')
{
printf("Zebra %s %s\n", ZEBRAVER, ZEBRADATE);
- printf(" (C) 1994-2005, Index Data ApS\n");
+ printf(" (C) 1994-2006, Index Data ApS\n");
#ifdef WIN32
#ifdef _DEBUG
printf(" WIN32 Debug\n");