based on cookies.
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: yaz-ir-assoc.h,v 1.6 1999-04-20 10:30:05 adam Exp $
+ * $Id: yaz-ir-assoc.h,v 1.7 1999-04-21 12:09:01 adam Exp $
*/
#include <yaz-z-assoc.h>
int get_lastReceived();
void set_lastReceived(int lastReceived);
- /// OtherInformation
- void set_otherInformationString (Z_OtherInformation **otherInformationP,
- int *oid, int categoryValue,
- const char *str);
- void set_otherInformationString (
- Z_OtherInformation **otherInformation,
- int oidval, int categoryValue,
- const char *str);
/// Settings
void set_proxy(const char *str);
const char *get_proxy();
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: yaz-proxy.h,v 1.4 1999-04-20 10:30:05 adam Exp $
+ * $Id: yaz-proxy.h,v 1.5 1999-04-21 12:09:01 adam Exp $
*/
#include <yaz-z-assoc.h>
class YAZ_EXPORT Yaz_ProxyClient : public Yaz_Z_Assoc {
friend Yaz_Proxy;
Yaz_ProxyClient(IYaz_PDU_Observable *the_PDU_Observable);
+ ~Yaz_ProxyClient();
void recv_Z_PDU(Z_APDU *apdu);
IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable);
Yaz_Proxy *m_server;
void failNotify();
- char *m_cookie;
+ void timeoutNotify();
+ char m_cookie[32];
Yaz_ProxyClient *m_next;
+ Yaz_ProxyClient **m_prev;
};
/// Information Retrieval Proxy Server.
void recv_Z_PDU(Z_APDU *apdu);
IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable);
void failNotify();
+ void timeoutNotify();
private:
char *get_cookie(Z_OtherInformation **otherInfo);
char *get_proxy(Z_OtherInformation **otherInfo);
+ Yaz_ProxyClient *get_client(Z_APDU *apdu);
Yaz_ProxyClient *m_client;
IYaz_PDU_Observable *m_PDU_Observable;
+ Yaz_ProxyClient *m_clientPool;
+ Yaz_Proxy *m_parent;
+ int m_seqno;
+ int m_keepalive;
};
+
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: yaz-z-assoc.h,v 1.2 1999-04-20 10:30:05 adam Exp $
+ * $Id: yaz-z-assoc.h,v 1.3 1999-04-21 12:09:01 adam Exp $
*/
#include <proto.h>
void failNotify();
/// Timeout notification
void timeoutNotify();
+ /// Timeout specify
+ void timeout(int timeout);
/// Begin Z39.50 client role
void client(const char *addr);
/// Begin Z39.50 server role
ODR odr_encode ();
ODR odr_decode ();
ODR odr_print ();
+
/// OtherInformation
+ void get_otherInfoAPDU(Z_APDU *apdu, Z_OtherInformation ***oip);
Z_OtherInformationUnit *update_otherInformation (
Z_OtherInformation **otherInformationP, int createFlag,
int *oid, int categoryValue);
+ void set_otherInformationString (
+ Z_OtherInformation **otherInformationP,
+ int *oid, int categoryValue,
+ const char *str);
+ void set_otherInformationString (
+ Z_OtherInformation **otherInformation,
+ int oidval, int categoryValue,
+ const char *str);
+ void set_otherInformationString (
+ Z_APDU *apdu,
+ int oidval, int categoryValue,
+ const char *str);
+ void set_apdu_log(const char *file);
private:
static int yaz_init_flag;
static int yaz_init_func();
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: yaz-z-query.h,v 1.3 1999-04-20 10:30:05 adam Exp $
+ * $Id: yaz-z-query.h,v 1.4 1999-04-21 12:09:01 adam Exp $
*/
#include <proto.h>
int len;
ODR odr_decode;
ODR odr_encode;
+ ODR odr_print;
};
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-client.cpp,v $
- * Revision 1.6 1999-04-20 10:30:05 adam
+ * Revision 1.7 1999-04-21 12:09:01 adam
+ * Many improvements. Modified to proxy server to work with "sessions"
+ * based on cookies.
+ *
+ * Revision 1.6 1999/04/20 10:30:05 adam
* Implemented various stuff for client and proxy. Updated calls
* to ODR to reflect new name parameter.
*
int cmd_find(char *args);
int cmd_show(char *args);
int cmd_cookie(char *args);
+ int cmd_init(char *args);
};
IYaz_PDU_Observer *MyClient::clone(IYaz_PDU_Observable *the_PDU_Observable)
else
{
printf("Unknown record representation.\n");
- if (!z_External(odr_print(), &r, 0))
+ if (!z_External(odr_print(), &r, 0, 0))
{
odr_perror(odr_print(), "Printing external");
odr_reset(odr_print());
void MyClient::recv_records (Z_Records *records)
{
+#ifdef ASN_COMPILED
Z_DiagRec dr, *dr_p = &dr;
+#endif
+ if (!records)
+ return;
int i;
switch (records->which)
{
}
printf ("Ok\n");
printf ("Hits: %d\n", *searchResponse->resultCount);
- if (searchResponse->records)
- recv_records (searchResponse->records);
+ recv_records (searchResponse->records);
}
void MyClient::recv_presentResponse(Z_PresentResponse *presentResponse)
int MyClient::cmd_open(char *host)
{
client (host);
+ m_socketManager->processEvent();
+ return 1;
+}
+
+int MyClient::cmd_init(char *args)
+{
if (send_initRequest() >= 0)
wait();
else
int start = m_setOffset, number = 1;
sscanf (args, "%d %d", &start, &number);
+ m_setOffset = start;
if (send_presentRequest(start, number) >= 0)
wait();
return 1;
int MyClient::cmd_cookie(char *args)
{
- set_cookie(args);
+ set_cookie(*args ? args : 0);
return 1;
}
{"find", &cmd_find, "<query>"},
{"show", &cmd_show, "[<start> [<number>]]"},
{"cookie", &cmd_cookie, "<cookie>"},
+ {"init", &cmd_init, ""},
{0,0,0}
};
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-ir-assoc.cpp,v $
- * Revision 1.6 1999-04-20 10:30:05 adam
+ * Revision 1.7 1999-04-21 12:09:01 adam
+ * Many improvements. Modified to proxy server to work with "sessions"
+ * based on cookies.
+ *
+ * Revision 1.6 1999/04/20 10:30:05 adam
* Implemented various stuff for client and proxy. Updated calls
* to ODR to reflect new name parameter.
*
*elementSetName = m_elementSetNames->u.generic;
}
-void Yaz_IR_Assoc::set_otherInformationString (
- Z_OtherInformation **otherInformation,
- int oidval, int categoryValue,
- const char *str)
-{
- int oid[OID_SIZE];
- struct oident ent;
- ent.proto = PROTO_Z3950;
- ent.oclass = CLASS_USERINFO;
- ent.value = (oid_value) oidval;
- if (!oid_ent_to_oid (&ent, oid))
- return ;
- set_otherInformationString(otherInformation, oid, categoryValue, str);
-}
-
-void Yaz_IR_Assoc::set_otherInformationString (
- Z_OtherInformation **otherInformation,
- int *oid, int categoryValue,
- const char *str)
-{
- Z_OtherInformationUnit *oi =
- update_otherInformation(otherInformation, 1, oid, categoryValue);
- if (!oi)
- return;
- oi->information.characterInfo = odr_strdup (odr_encode(), str);
-}
-
void Yaz_IR_Assoc::recv_Z_PDU(Z_APDU *apdu)
{
logf (LOG_LOG, "recv_Z_PDU");
logf (LOG_LOG, "send_searchRequest");
assert (req->otherInfo == 0);
if (m_cookie)
+ {
set_otherInformationString(&req->otherInfo, VAL_COOKIE, 1, m_cookie);
+ assert (req->otherInfo);
+ }
return send_Z_PDU(apdu);
}
void Yaz_IR_Assoc::set_proxy(const char *str)
{
- delete m_proxy;
- m_proxy = new char[strlen(str)+1];
- strcpy (m_proxy, str);
+ delete [] m_proxy;
+ m_proxy = 0;
+ if (str)
+ {
+ m_proxy = new char[strlen(str)+1];
+ strcpy (m_proxy, str);
+ }
}
void Yaz_IR_Assoc::set_cookie(const char *str)
{
- delete m_cookie;
- m_cookie = new char[strlen(str)+1];
- strcpy(m_cookie, str);
+ delete [] m_cookie;
+ m_cookie = 0;
+ if (str)
+ {
+ m_cookie = new char[strlen(str)+1];
+ strcpy(m_cookie, str);
+ }
}
const char *Yaz_IR_Assoc::get_cookie()
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-pdu-assoc.cpp,v $
- * Revision 1.6 1999-04-20 10:30:05 adam
+ * Revision 1.7 1999-04-21 12:09:01 adam
+ * Many improvements. Modified to proxy server to work with "sessions"
+ * based on cookies.
+ *
+ * Revision 1.6 1999/04/20 10:30:05 adam
* Implemented various stuff for client and proxy. Updated calls
* to ODR to reflect new name parameter.
*
assoc->m_socketObservable->maskObserver(assoc,
YAZ_SOCKET_OBSERVE_READ|
YAZ_SOCKET_OBSERVE_EXCEPT);
- if (m_idleTime)
- assoc->m_socketObservable->timeoutObserver(assoc, m_idleTime);
+ assoc->m_socketObservable->timeoutObserver(assoc,
+ assoc->m_idleTime);
}
}
else if (m_state == Ready)
if (!m_cs)
{
logf (LOG_LOG, "Yaz_PDU_Assoc::send_PDU failed, m_cs == 0");
- return 0;
+ return -1;
}
while (*pq)
pq = &(*pq)->m_next;
void Yaz_PDU_Assoc::idleTime(int idleTime)
{
m_idleTime = idleTime;
+ logf (LOG_LOG, "Yaz_PDU_Assoc::idleTime(%d)", idleTime);
+ m_socketObservable->timeoutObserver(this, m_idleTime);
}
void Yaz_PDU_Assoc::connect(IYaz_PDU_Observer *observer,
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-proxy-main.cpp,v $
- * Revision 1.4 1999-04-09 11:46:57 adam
+ * Revision 1.5 1999-04-21 12:09:01 adam
+ * Many improvements. Modified to proxy server to work with "sessions"
+ * based on cookies.
+ *
+ * Revision 1.4 1999/04/09 11:46:57 adam
* Added object Yaz_Z_Assoc. Much more functional client.
*
* Revision 1.3 1999/02/02 14:01:21 adam
Yaz_SocketManager mySocketManager;
Yaz_Proxy proxy(new Yaz_PDU_Assoc(&mySocketManager, 0));
- proxy.server(argc < 2 ? "@:9999" : argv[1]);
+ proxy.server(argc < 2 ? "@:9000" : argv[1]);
while (mySocketManager.processEvent() > 0)
;
return 0;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-proxy.cpp,v $
- * Revision 1.4 1999-04-20 10:30:05 adam
+ * Revision 1.5 1999-04-21 12:09:01 adam
+ * Many improvements. Modified to proxy server to work with "sessions"
+ * based on cookies.
+ *
+ * Revision 1.4 1999/04/20 10:30:05 adam
* Implemented various stuff for client and proxy. Updated calls
* to ODR to reflect new name parameter.
*
{
m_PDU_Observable = the_PDU_Observable;
m_client = 0;
+ m_parent = 0;
+ m_clientPool = 0;
+ m_seqno = 1;
+ m_keepalive = 1;
}
Yaz_Proxy::~Yaz_Proxy()
IYaz_PDU_Observer *Yaz_Proxy::clone(IYaz_PDU_Observable
*the_PDU_Observable)
{
- return new Yaz_Proxy(the_PDU_Observable);
+ Yaz_Proxy *new_proxy = new Yaz_Proxy(the_PDU_Observable);
+ new_proxy->m_parent = this;
+ new_proxy->timeout(120);
+ return new_proxy;
}
char *Yaz_Proxy::get_cookie(Z_OtherInformation **otherInfo)
ent.proto = PROTO_Z3950;
ent.oclass = CLASS_USERINFO;
ent.value = (oid_value) VAL_COOKIE;
- if (oid_ent_to_oid (&ent, oid) &&
+ assert (oid_ent_to_oid (&ent, oid));
+
+ if (oid_ent_to_oid (&ent, oid) &&
(oi = update_otherInformation(otherInfo, 0, oid, 1)) &&
oi->which == Z_OtherInfo_characterInfo)
return oi->information.characterInfo;
return 0;
}
+Yaz_ProxyClient *Yaz_Proxy::get_client(Z_APDU *apdu)
+{
+ assert (m_parent);
+ Yaz_Proxy *parent = m_parent;
+ Z_OtherInformation **oi;
+ Yaz_ProxyClient *c = m_client;
+
+ get_otherInfoAPDU(apdu, &oi);
+ char *cookie = get_cookie(oi);
+ logf (LOG_LOG, "Yaz_Proxy::get_client cookie=%s", cookie ? cookie :
+ "<null>");
+ if (cookie)
+ {
+ for (c = parent->m_clientPool; c; c = c->m_next)
+ {
+ assert (c->m_prev);
+ assert (*c->m_prev == c);
+ if (!strcmp(cookie,c->m_cookie))
+ {
+ logf (LOG_LOG, "Yaz_Proxy::get_client cached");
+ break;
+ }
+ }
+ }
+ else if (!m_client)
+ {
+ logf (LOG_LOG, "Yaz_Proxy::get_client creating new");
+ c = new Yaz_ProxyClient(m_PDU_Observable->clone());
+ c->m_next = parent->m_clientPool;
+ if (c->m_next)
+ c->m_next->m_prev = &c->m_next;
+ parent->m_clientPool = c;
+ c->m_prev = &parent->m_clientPool;
+
+ sprintf (c->m_cookie, "%d", parent->m_seqno);
+ (parent->m_seqno)++;
+
+ if (apdu->which == Z_APDU_initRequest)
+ {
+ logf (LOG_LOG, "got InitRequest");
+
+ char *proxy_host = get_proxy(&apdu->u.initRequest->otherInfo);
+ if (proxy_host)
+ c->client(proxy_host);
+ else
+ c->client("localhost:9999");
+ }
+ c->timeout(600);
+ }
+ return c;
+}
+
void Yaz_Proxy::recv_Z_PDU(Z_APDU *apdu)
{
- if (apdu->which == Z_APDU_initRequest)
+ logf (LOG_LOG, "Yaz_Proxy::recv_Z_PDU");
+ // Determine our client.
+ m_client = get_client(apdu);
+ if (!m_client)
{
- assert (m_client == 0);
- logf (LOG_LOG, "got InitRequest");
- m_client = new Yaz_ProxyClient(m_PDU_Observable->clone());
- m_client->m_server = this;
-
- char *proxy_host = get_cookie(&apdu->u.initRequest->otherInfo);
- if (proxy_host)
- m_client->client(proxy_host);
- else
- m_client->client("localhost:8888");
+ delete this;
+ return;
+ }
+ m_client->m_server = this;
+
+ Z_OtherInformation **oi;
+ get_otherInfoAPDU(apdu, &oi);
+ *oi = 0;
+ logf (LOG_LOG, "Yaz_ProxyClient::send_Z_PDU");
+ if (m_client->send_Z_PDU(apdu) < 0)
+ {
+ delete m_client;
+ delete this;
}
- assert (m_client);
- logf (LOG_LOG, "sending PDU");
- m_client->send_Z_PDU(apdu);
}
void Yaz_Proxy::failNotify()
{
logf (LOG_LOG, "failNotity server");
- delete m_client;
+ if (m_keepalive)
+ {
+ // Tell client (if any) that not server connection is there..
+ if (m_client)
+ m_client->m_server = 0;
+ }
+ else
+ {
+ delete m_client;
+ }
delete this;
}
return new Yaz_ProxyClient(the_PDU_Observable);
}
+Yaz_ProxyClient::~Yaz_ProxyClient()
+{
+ if (m_prev)
+ {
+ *m_prev = m_next;
+ if (m_next)
+ m_next->m_prev = m_prev;
+ }
+}
+
+void Yaz_Proxy::timeoutNotify()
+{
+ failNotify();
+}
+
+void Yaz_ProxyClient::timeoutNotify()
+{
+ failNotify();
+}
+
Yaz_ProxyClient::Yaz_ProxyClient(IYaz_PDU_Observable *the_PDU_Observable) :
Yaz_Z_Assoc (the_PDU_Observable)
{
- m_cookie = 0;
+ m_cookie[0] = 0;
m_next = 0;
+ m_prev = 0;
}
void Yaz_ProxyClient::recv_Z_PDU(Z_APDU *apdu)
{
- m_server->send_Z_PDU(apdu);
+ logf (LOG_LOG, "Yaz_ProxyClient::recv_Z_PDU");
+ if (m_cookie)
+ set_otherInformationString (apdu, VAL_COOKIE, 1, m_cookie);
+ if (m_server)
+ {
+ logf (LOG_LOG, "Yaz_Proxy::send_Z_PDU");
+ m_server->send_Z_PDU(apdu);
+ }
}
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-server.cpp,v $
- * Revision 1.5 1999-04-09 11:46:57 adam
+ * Revision 1.6 1999-04-21 12:09:01 adam
+ * Many improvements. Modified to proxy server to work with "sessions"
+ * based on cookies.
+ *
+ * Revision 1.5 1999/04/09 11:46:57 adam
* Added object Yaz_Z_Assoc. Much more functional client.
*
* Revision 1.4 1999/03/23 14:17:57 adam
logf (LOG_LOG, "got presentRequest");
apdu = create_Z_PDU(Z_APDU_presentResponse);
send_Z_PDU(apdu);
- stop = 1;
+ // stop = 1;
break;
}
}
IYaz_PDU_Observer *MyServer::clone(IYaz_PDU_Observable *the_PDU_Observable)
{
+ MyServer *new_server;
logf (LOG_LOG, "child no %d", m_no);
m_no++;
- return new MyServer(the_PDU_Observable);
+ new_server = new MyServer(the_PDU_Observable);
+ new_server->timeout(60);
+ return new_server;
}
MyServer::MyServer(IYaz_PDU_Observable *the_PDU_Observable) :
Yaz_SocketManager mySocketManager;
Yaz_PDU_Assoc *my_PDU_Assoc = new Yaz_PDU_Assoc(&mySocketManager, 0);
- my_PDU_Assoc->idleTime(20);
MyServer z(my_PDU_Assoc);
-
+
if (argc <= 1)
z.server("@:9999");
else
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-socket-manager.cpp,v $
- * Revision 1.5 1999-04-09 11:46:57 adam
+ * Revision 1.6 1999-04-21 12:09:01 adam
+ * Many improvements. Modified to proxy server to work with "sessions"
+ * based on cookies.
+ *
+ * Revision 1.5 1999/04/09 11:46:57 adam
* Added object Yaz_Z_Assoc. Much more functional client.
*
* Revision 1.4 1999/03/23 14:17:57 adam
struct timeval to;
to.tv_sec = timeout;
to.tv_usec = 0;
-
+
+ logf (LOG_LOG, "timeout=%d", timeout);
while ((res = select(max + 1, &in, &out, &except, timeout ? &to : 0)) < 0)
if (errno != EINTR)
return -1;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-z-assoc.cpp,v $
- * Revision 1.2 1999-04-20 10:30:05 adam
+ * Revision 1.3 1999-04-21 12:09:01 adam
+ * Many improvements. Modified to proxy server to work with "sessions"
+ * based on cookies.
+ *
+ * Revision 1.2 1999/04/20 10:30:05 adam
* Implemented various stuff for client and proxy. Updated calls
* to ODR to reflect new name parameter.
*
logf (LOG_LOG, "recv_PDU len=%d", len);
Z_APDU *apdu = decode_Z_PDU (buf, len);
if (apdu)
+ {
recv_Z_PDU (apdu);
+ }
}
Z_APDU *Yaz_Z_Assoc::create_Z_PDU(int type)
{
- return zget_APDU(m_odr_out, type);
+ Z_APDU *apdu = zget_APDU(m_odr_out, type);
+ if (apdu->which == Z_APDU_initRequest)
+ {
+ Z_InitRequest * p = apdu->u.initRequest;
+ char *newName = (char*) odr_malloc(m_odr_out, 50);
+ strcpy (newName, p->implementationName);
+ strcat (newName, " YAZ++");
+ p->implementationName = newName;
+ }
+ return apdu;
}
int Yaz_Z_Assoc::send_Z_PDU(Z_APDU *apdu)
}
else
{
- logf (LOG_LOG, "decoded ok");
+ z_APDU(m_odr_print, &apdu, 0, "decode");
return apdu;
}
}
logf (LOG_LOG, "yaz_Z_Assoc::encode_Z_PDU failed");
return -1;
}
+ z_APDU(m_odr_print, &apdu, 0, "encode");
*buf = odr_getbuf (m_odr_out, len, 0);
odr_reset (m_odr_out);
return *len;
return m_odr_print;
}
+void Yaz_Z_Assoc::timeout(int timeout)
+{
+ m_PDU_Observable->idleTime(timeout);
+}
+
+void Yaz_Z_Assoc::get_otherInfoAPDU(Z_APDU *apdu, Z_OtherInformation ***oip)
+{
+ switch (apdu->which)
+ {
+ case Z_APDU_initRequest:
+ *oip = &apdu->u.initRequest->otherInfo;
+ break;
+ case Z_APDU_searchRequest:
+ *oip = &apdu->u.searchRequest->otherInfo;
+ break;
+ case Z_APDU_presentRequest:
+ *oip = &apdu->u.presentRequest->otherInfo;
+ break;
+ case Z_APDU_sortRequest:
+ *oip = &apdu->u.sortRequest->otherInfo;
+ break;
+ case Z_APDU_scanRequest:
+ *oip = &apdu->u.scanRequest->otherInfo;
+ break;
+ case Z_APDU_initResponse:
+ *oip = &apdu->u.initResponse->otherInfo;
+ break;
+ case Z_APDU_searchResponse:
+ *oip = &apdu->u.searchResponse->otherInfo;
+ break;
+ case Z_APDU_presentResponse:
+ *oip = &apdu->u.presentResponse->otherInfo;
+ break;
+ case Z_APDU_sortResponse:
+ *oip = &apdu->u.sortResponse->otherInfo;
+ break;
+ case Z_APDU_scanResponse:
+ *oip = &apdu->u.scanResponse->otherInfo;
+ break;
+ default:
+ *oip = 0;
+ break;
+ }
+}
+
+void Yaz_Z_Assoc::set_otherInformationString (
+ Z_APDU *apdu,
+ int oidval, int categoryValue,
+ const char *str)
+{
+ Z_OtherInformation **otherInformation;
+ get_otherInfoAPDU(apdu, &otherInformation);
+ if (!otherInformation)
+ return;
+ set_otherInformationString(otherInformation, oidval, categoryValue, str);
+}
+
+void Yaz_Z_Assoc::set_otherInformationString (
+ Z_OtherInformation **otherInformation,
+ int oidval, int categoryValue,
+ const char *str)
+{
+ int oid[OID_SIZE];
+ struct oident ent;
+ ent.proto = PROTO_Z3950;
+ ent.oclass = CLASS_USERINFO;
+ ent.value = (oid_value) oidval;
+ if (!oid_ent_to_oid (&ent, oid))
+ return ;
+ set_otherInformationString(otherInformation, oid, categoryValue, str);
+}
+
+void Yaz_Z_Assoc::set_otherInformationString (
+ Z_OtherInformation **otherInformation,
+ int *oid, int categoryValue,
+ const char *str)
+{
+ Z_OtherInformationUnit *oi =
+ update_otherInformation(otherInformation, 1, oid, categoryValue);
+ if (!oi)
+ return;
+ oi->information.characterInfo = odr_strdup (odr_encode(), str);
+}
+
Z_OtherInformationUnit *Yaz_Z_Assoc::update_otherInformation (
Z_OtherInformation **otherInformationP, int createFlag,
int *oid, int categoryValue)
for (i = 0; i<8; i++)
otherInformation->list[i] = 0;
}
+ logf (LOG_LOG, "Yaz_Z_Assoc::update_otherInformation num=%d",
+ otherInformation->num_elements);
for (i = 0; i<otherInformation->num_elements; i++)
{
assert (otherInformation->list[i]);
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-z-query.cpp,v $
- * Revision 1.3 1999-04-20 10:30:05 adam
+ * Revision 1.4 1999-04-21 12:09:01 adam
+ * Many improvements. Modified to proxy server to work with "sessions"
+ * based on cookies.
+ *
+ * Revision 1.3 1999/04/20 10:30:05 adam
* Implemented various stuff for client and proxy. Updated calls
* to ODR to reflect new name parameter.
*
{
odr_encode = odr_createmem (ODR_ENCODE);
odr_decode = odr_createmem (ODR_DECODE);
+ odr_print = odr_createmem (ODR_PRINT);
}
int Yaz_Z_Query::set_rpn (const char *rpn)
return -1;
if (!z_Query (odr_encode, &query, 0, 0))
return -1;
+ z_Query(odr_print, &query, 0, 0);
buf = odr_getbuf (odr_encode, &len, 0);
return len;
}
{
odr_destroy (odr_encode);
odr_destroy (odr_decode);
+ odr_destroy (odr_print);
}
Z_Query *Yaz_Z_Query::get_Z_Query ()