Fixed bug in zass_open - variable initialized after use
[egate.git] / zlayer / zaccess-yaz.c
index f8615d9..62d3ef2 100644 (file)
@@ -4,7 +4,10 @@
  * Z39.50 API for the Email gateway - YAZ version
  *
  * $Log: zaccess-yaz.c,v $
- * Revision 1.1  1995/04/17 11:26:53  quinn
+ * Revision 1.2  1995/04/19 09:24:02  quinn
+ * Fixed bug in zass_open - variable initialized after use
+ *
+ * Revision 1.1  1995/04/17  11:26:53  quinn
  * Added YAZ version of zaccess
  *
  *
@@ -193,14 +196,14 @@ ZASS zass_open(char *host, int port)
        return 0;
     }
     gw_log(ZASS_DEBUG, ZASS_TYPE, "connected ok");
+    p->inbuf = 0;
+    p->inbuflen = 0;
     if (send_initreq(p) < 0 || receive_initres(p) < 0)
     {
        gw_log(GW_LOG_FATAL, ZASS_TYPE, "Failed to initialize");
        return 0;
     }
     gw_log(ZASS_DEBUG, ZASS_TYPE, "Sent init request");
-    p->inbuf = 0;
-    p->inbuflen = 0;
     return p;
 }