* See the file LICENSE for details.
*
* $Log: yaz-ir-assoc.cpp,v $
- * Revision 1.15 2001-04-26 12:17:49 heikki
+ * Revision 1.16 2001-08-13 16:39:12 adam
+ * PDU_Assoc keeps track of children. Using yaz_log instead of logf.
+ *
+ * Revision 1.15 2001/04/26 12:17:49 heikki
* Ursula stuff, mostly in the test client
*
* Revision 1.14 2000/10/11 11:58:16 adam
void Yaz_IR_Assoc::set_databaseNames (int num, const char **list)
{
int i;
- logf (m_log, "Yaz_IR_Assoc::set_databaseNames num=%d", num);
+ yaz_log (m_log, "Yaz_IR_Assoc::set_databaseNames num=%d", num);
for (i = 0; i<m_num_databaseNames; i++)
delete [] m_databaseNames[i];
delete [] m_databaseNames;
void Yaz_IR_Assoc::recv_Z_PDU(Z_APDU *apdu)
{
- logf (m_log, "recv_Z_PDU");
+ yaz_log (m_log, "recv_Z_PDU");
m_lastReceived = apdu->which;
switch (apdu->which)
{
case Z_APDU_initResponse:
- logf (m_log, "recv InitResponse");
- recv_initResponse(apdu->u.initResponse);
- break;
+ yaz_log (m_log, "recv InitResponse");
+ recv_initResponse(apdu->u.initResponse);
+ break;
case Z_APDU_initRequest:
- logf (m_log, "recv InitRequest");
- recv_initRequest(apdu->u.initRequest);
+ yaz_log (m_log, "recv InitRequest");
+ recv_initRequest(apdu->u.initRequest);
break;
case Z_APDU_searchRequest:
- logf (m_log, "recv searchRequest");
- recv_searchRequest(apdu->u.searchRequest);
+ yaz_log (m_log, "recv searchRequest");
+ recv_searchRequest(apdu->u.searchRequest);
break;
case Z_APDU_searchResponse:
- logf (m_log, "recv searchResponse");
- recv_searchResponse(apdu->u.searchResponse);
- break;
+ yaz_log (m_log, "recv searchResponse");
+ recv_searchResponse(apdu->u.searchResponse);
+ break;
case Z_APDU_presentRequest:
- logf (m_log, "recv presentRequest");
- recv_presentRequest(apdu->u.presentRequest);
+ yaz_log (m_log, "recv presentRequest");
+ recv_presentRequest(apdu->u.presentRequest);
break;
case Z_APDU_presentResponse:
- logf (m_log, "recv presentResponse");
- recv_presentResponse(apdu->u.presentResponse);
+ yaz_log (m_log, "recv presentResponse");
+ recv_presentResponse(apdu->u.presentResponse);
break;
case Z_APDU_extendedServicesResponse:
- logf (m_log, "recv extendedServiceResponse");
+ yaz_log (m_log, "recv extendedServiceResponse");
recv_extendedServicesResponse(apdu->u.extendedServicesResponse);
break;
}
oid_ent_to_oid(&prefsyn, oid_syntax);
req->preferredRecordSyntax = oid_syntax;
}
- logf (m_log, "send_searchRequest");
+ yaz_log (m_log, "send_searchRequest");
assert (req->otherInfo == 0);
if (m_cookie)
{
* See the file LICENSE for details.
*
* $Log: yaz-my-server.cpp,v $
- * Revision 1.6 2001-05-17 14:18:03 adam
+ * Revision 1.7 2001-08-13 16:39:12 adam
+ * PDU_Assoc keeps track of children. Using yaz_log instead of logf.
+ *
+ * Revision 1.6 2001/05/17 14:18:03 adam
* New handler for old version item update for server:
* void update_service0 (Z_ExtendedServicesRequest *req,
* Z_IU0Update *io, Z_ExtendedServicesResponse *res)
yaz_log (LOG_LOG, "MyServer::update_service (v1.0)");
}
-
#if HAVE_YAZ_URSULA_H
void MyUrsula::ursula_service (Z_ExtendedServicesRequest *req,
Z_UrsPDU *u,
{
}
-
void usage(char *prog)
{
fprintf (stderr, "%s: [-a log] [-v level] [-T] @:port\n", prog);
* See the file LICENSE for details.
*
* $Log: yaz-pdu-assoc-thread.cpp,v $
- * Revision 1.2 2001-03-27 14:47:45 adam
+ * Revision 1.3 2001-08-13 16:39:12 adam
+ * PDU_Assoc keeps track of children. Using yaz_log instead of logf.
+ *
+ * Revision 1.2 2001/03/27 14:47:45 adam
* New server facility scheme.
*
* Revision 1.1 2001/03/26 14:43:49 adam
{
Yaz_SocketManager *s = (Yaz_SocketManager *) p;
- logf (LOG_LOG, "thread started");
+ yaz_log (LOG_LOG, "thread started");
while (s->processEvent() > 0)
;
- logf (LOG_LOG, "thread finished");
+ yaz_log (LOG_LOG, "thread finished");
#ifdef WIN32
#else
return 0;
{
Yaz_SocketManager *socket_observable = new Yaz_SocketManager;
Yaz_PDU_Assoc *new_observable = new Yaz_PDU_Assoc (socket_observable, cs);
-
+
+ new_observable->m_next = m_children;
+ m_children = new_observable;
+ new_observable->m_parent = this;
+
/// Clone PDU Observer
new_observable->m_PDU_Observer =
m_PDU_Observer->sessionNotify(new_observable, cs_fileno(cs));
* See the file LICENSE for details.
*
* $Log: yaz-pdu-assoc.cpp,v $
- * Revision 1.23 2001-03-26 14:43:49 adam
+ * Revision 1.24 2001-08-13 16:39:12 adam
+ * PDU_Assoc keeps track of children. Using yaz_log instead of logf.
+ *
+ * Revision 1.23 2001/03/26 14:43:49 adam
* New threaded PDU association.
*
* Revision 1.22 2001/01/29 11:18:24 adam
else
{
m_state = Ready;
- m_PDU_Observer->connectNotify();
+ if (m_PDU_Observer)
+ m_PDU_Observer->connectNotify();
flush_PDU();
}
}
setup observer for child fileid in pdu-assoc
4. start thread
*/
+ yaz_log (m_log, "new session: parent fd=%d child fd=%d",
+ cs_fileno(m_cs), cs_fileno(new_line));
childNotify (new_line);
}
break;
{
yaz_log (m_log, "Yaz_PDU_Assoc::Connection closed by peer");
close();
- m_PDU_Observer->failNotify(); // problem here..
+ if (m_PDU_Observer)
+ m_PDU_Observer->failNotify(); // problem here..
return;
}
// lock it, so we know if recv_PDU deletes it.
int destroyed = 0;
m_destroyed = &destroyed;
+ if (!m_PDU_Observer)
+ return;
+
m_PDU_Observer->recv_PDU(m_input_buf, res);
m_destroyed = 0;
if (destroyed) // it really was destroyed, return now.
}
break;
case Closed:
- logf (m_log, "CLOSING state=%d event was %d", m_state, event);
+ yaz_log (m_log, "CLOSING state=%d event was %d", m_state, event);
close();
m_PDU_Observer->failNotify();
break;
default:
- logf (m_log, "Unknown state=%d event was %d", m_state, event);
+ yaz_log (m_log, "Unknown state=%d event was %d", m_state, event);
close();
m_PDU_Observer->failNotify();
}
void Yaz_PDU_Assoc::close()
{
+ Yaz_PDU_Assoc *ch;
+ for (ch = m_children; ch; ch = ch->m_next)
+ ch->close();
+
m_socketObservable->deleteObserver(this);
m_state = Closed;
if (m_cs)
{
- logf (m_log, "Yaz_PDU_Assoc::close fd=%d", cs_fileno(m_cs));
+ yaz_log (m_log, "Yaz_PDU_Assoc::close fd=%d", cs_fileno(m_cs));
cs_close (m_cs);
}
m_cs = 0;
void Yaz_PDU_Assoc::destroy()
{
close();
+
if (m_destroyed)
*m_destroyed = 1;
Yaz_PDU_Assoc **c;
here->m_parent = 0;
delete here;
}
+ yaz_log (m_log, "Yaz_PDU_Assoc::destroy this=%p", this);
}
Yaz_PDU_Assoc::PDU_Queue::PDU_Queue(const char *buf, int len)
if (m_state != Ready && m_state != Writing)
{
- logf (m_log, "YAZ_PDU_Assoc::flush_PDU, not ready");
+ yaz_log (m_log, "YAZ_PDU_Assoc::flush_PDU, not ready");
return 1;
}
PDU_Queue *q = m_queue_out;
if (!q)
{
m_state = Ready;
- logf (m_log, "YAZ_PDU_Assoc::flush_PDU queue empty");
+ yaz_log (m_log, "YAZ_PDU_Assoc::flush_PDU queue empty");
m_socketObservable->maskObserver(this, YAZ_SOCKET_OBSERVE_READ|
YAZ_SOCKET_OBSERVE_WRITE|
YAZ_SOCKET_OBSERVE_EXCEPT);
r = cs_put (m_cs, q->m_buf, q->m_len);
if (r < 0)
{
- logf (m_log, "Yaz_PDU_Assoc::flush_PDU cs_put failed");
+ yaz_log (m_log, "Yaz_PDU_Assoc::flush_PDU cs_put failed");
close();
m_PDU_Observer->failNotify();
return r;
mask |= YAZ_SOCKET_OBSERVE_READ;
m_socketObservable->maskObserver(this, mask);
- logf (m_log, "Yaz_PDU_Assoc::flush_PDU cs_put %d bytes (incomplete)",
- q->m_len);
+ yaz_log (m_log, "Yaz_PDU_Assoc::flush_PDU cs_put %d bytes (incomp)",
+ q->m_len);
return r;
}
m_state = Ready;
- logf (m_log, "Yaz_PDU_Assoc::flush_PDU cs_put %d bytes", q->m_len);
+ yaz_log (m_log, "Yaz_PDU_Assoc::flush_PDU cs_put %d bytes", q->m_len);
// whole packet sent... delete this and proceed to next ...
m_queue_out = q->m_next;
delete q;
int Yaz_PDU_Assoc::send_PDU(const char *buf, int len)
{
- logf (m_log, "Yaz_PDU_Assoc::send_PDU");
+ yaz_log (m_log, "Yaz_PDU_Assoc::send_PDU");
PDU_Queue **pq = &m_queue_out;
int is_idle = (*pq ? 0 : 1);
if (!m_cs)
{
- logf (m_log, "Yaz_PDU_Assoc::send_PDU failed, m_cs == 0");
+ yaz_log (m_log, "Yaz_PDU_Assoc::send_PDU failed, m_cs == 0");
return -1;
}
while (*pq)
if (is_idle)
return flush_PDU ();
else
- logf (m_log, "Yaz_PDU_Assoc::cannot send_PDU fd=%d",
- cs_fileno(m_cs));
+ yaz_log (m_log, "Yaz_PDU_Assoc::cannot send_PDU fd=%d",
+ cs_fileno(m_cs));
return 0;
}
{
close();
- logf (LOG_LOG, "Adding listener %s", addr);
+ yaz_log (LOG_LOG, "Adding listener %s", addr);
m_PDU_Observer = observer;
void *ap;
m_socketObservable->addObserver(cs_fileno(m_cs), this);
m_socketObservable->maskObserver(this, YAZ_SOCKET_OBSERVE_READ|
YAZ_SOCKET_OBSERVE_EXCEPT);
- logf (m_log, "Yaz_PDU_Assoc::listen ok fd=%d", cs_fileno(m_cs));
+ yaz_log (m_log, "Yaz_PDU_Assoc::listen ok fd=%d", cs_fileno(m_cs));
m_state = Listen;
}
void Yaz_PDU_Assoc::idleTime(int idleTime)
{
m_idleTime = idleTime;
- logf (m_log, "Yaz_PDU_Assoc::idleTime(%d)", idleTime);
+ yaz_log (m_log, "Yaz_PDU_Assoc::idleTime(%d)", idleTime);
m_socketObservable->timeoutObserver(this, m_idleTime);
}
void Yaz_PDU_Assoc::connect(IYaz_PDU_Observer *observer,
const char *addr)
{
- logf (m_log, "Yaz_PDU_Assoc::connect %s", addr);
+ yaz_log (m_log, "Yaz_PDU_Assoc::connect %s", addr);
close();
m_PDU_Observer = observer;
void *ap;
m_cs = comstack(addr, &ap);
int res = cs_connect (m_cs, ap);
- logf (m_log, "Yaz_PDU_Assoc::connect fd=%d res=%d", cs_fileno(m_cs), res);
+ yaz_log (m_log, "Yaz_PDU_Assoc::connect fd=%d res=%d", cs_fileno(m_cs),
+ res);
m_socketObservable->addObserver(cs_fileno(m_cs), this);
if (res >= 0)
// Single-threaded... Only useful for non-blocking handlers
void Yaz_PDU_Assoc::childNotify(COMSTACK cs)
{
+
+
Yaz_PDU_Assoc *new_observable =
new Yaz_PDU_Assoc (m_socketObservable, cs);
+ new_observable->m_next = m_children;
+ m_children = new_observable;
+ new_observable->m_parent = this;
+
// Clone PDU Observer
new_observable->m_PDU_Observer = m_PDU_Observer->sessionNotify
(new_observable, cs_fileno(cs));
* See the file LICENSE for details.
*
* $Log: yaz-proxy.cpp,v $
- * Revision 1.25 2001-04-25 18:59:30 adam
+ * Revision 1.26 2001-08-13 16:39:12 adam
+ * PDU_Assoc keeps track of children. Using yaz_log instead of logf.
+ *
+ * Revision 1.25 2001/04/25 18:59:30 adam
* Added referenceId handling for server.
*
* Revision 1.24 2001/04/10 10:48:08 adam
get_otherInfoAPDU(apdu, &oi);
char *cookie = get_cookie(oi);
- logf (LOG_LOG, "Yaz_Proxy::get_client cookie=%s", cookie ? cookie :
+ yaz_log (LOG_LOG, "Yaz_Proxy::get_client cookie=%s", cookie ? cookie :
"null");
const char *proxy_host = get_proxy(oi);
if (proxy_host)
set_proxyTarget(proxy_host);
- logf (LOG_LOG, "proxy_host = %s", m_proxyTarget ? m_proxyTarget:"none");
+ yaz_log (LOG_LOG, "proxy_host = %s", m_proxyTarget ? m_proxyTarget:"none");
// no target specified at all?
if (!m_proxyTarget)
if (cookie && *cookie)
{
- logf (LOG_LOG, "lookup of clients cookie=%s target=%s",
+ yaz_log (LOG_LOG, "lookup of clients cookie=%s target=%s",
cookie, m_proxyTarget);
Yaz_ProxyClient *cc = 0;
for (c = parent->m_clientPool; c; c = c->m_next)
{
- logf (LOG_LOG, " found client cookie = %s target=%s seqno=%d",
+ yaz_log (LOG_LOG, " found client cookie = %s target=%s seqno=%d",
c->m_cookie, c->get_hostname(), c->m_seqno);
assert (c->m_prev);
assert (*c->m_prev == c);
if (!strcmp(cookie,c->m_cookie) &&
!strcmp(m_proxyTarget, c->get_hostname()))
{
- logf (LOG_LOG, "found!");
+ yaz_log (LOG_LOG, "found!");
cc = c;
}
}
// we have an initRequest we can safely do re-open
if (c->m_waiting && apdu->which == Z_APDU_initRequest)
{
- logf (LOG_LOG, "reopen target=%s", c->get_hostname());
+ yaz_log (LOG_LOG, "reopen target=%s", c->get_hostname());
c->close();
c->client(m_proxyTarget);
c->m_init_flag = 0;
{
if (apdu->which != Z_APDU_initRequest)
{
- logf (LOG_LOG, "no first INIT!");
+ yaz_log (LOG_LOG, "no first INIT!");
return 0;
}
- logf (LOG_LOG, "got InitRequest");
+ yaz_log (LOG_LOG, "got InitRequest");
// go through list of clients - and find the lowest/oldest one.
Yaz_ProxyClient *c_min = 0;
c = c_min;
if (c->m_waiting || strcmp(m_proxyTarget, c->get_hostname()))
{
- logf (LOG_LOG, "Yaz_Proxy::get_client re-init session %d",
+ yaz_log (LOG_LOG, "Yaz_Proxy::get_client re-init session %d",
c->m_seqno);
if (c->m_server && c->m_server != this)
delete c->m_server;
}
else
{
- logf (LOG_LOG, "Yaz_Proxy::get_client re-use session %d to %d",
+ yaz_log (LOG_LOG,
+ "Yaz_Proxy::get_client re-use session %d to %d",
c->m_seqno, parent->m_seqno);
if (cookie)
strcpy (c->m_cookie, cookie);
}
else
{
- logf (LOG_LOG, "Yaz_Proxy::get_client making session %d",
+ yaz_log (LOG_LOG, "Yaz_Proxy::get_client making session %d",
parent->m_seqno);
c = new Yaz_ProxyClient(m_PDU_Observable->clone());
c->m_next = parent->m_clientPool;
strcpy (c->m_cookie, cookie);
else
c->m_cookie[0] = '\0';
- logf (LOG_LOG, "Yaz_Proxy::get_client connect to %s", m_proxyTarget);
+ yaz_log (LOG_LOG, "Yaz_Proxy::get_client connect to %s",
+ m_proxyTarget);
c->m_seqno = parent->m_seqno;
c->client(m_proxyTarget);
c->m_init_flag = 0;
m_client->m_last_resultCount < *sr->largeSetLowerBound)
{
// medium Set
- logf (LOG_LOG, "Yaz_Proxy::result_set_optimize medium set");
+ yaz_log (LOG_LOG, "Yaz_Proxy::result_set_optimize medium set");
Z_APDU *new_apdu = create_Z_PDU(Z_APDU_presentRequest);
Z_PresentRequest *pr = new_apdu->u.presentRequest;
pr->referenceId = sr->referenceId;
m_client->m_last_resultCount == 0)
{
// large set
- logf (LOG_LOG, "Yaz_Proxy::result_set_optimize large set");
+ yaz_log (LOG_LOG, "Yaz_Proxy::result_set_optimize large set");
Z_APDU *new_apdu = create_Z_PDU(Z_APDU_searchResponse);
new_apdu->u.searchResponse->referenceId = sr->referenceId;
new_apdu->u.searchResponse->resultCount =
else
{
// small set
- logf (LOG_LOG, "Yaz_Proxy::result_set_optimize small set");
+ yaz_log (LOG_LOG, "Yaz_Proxy::result_set_optimize small set");
Z_APDU *new_apdu = create_Z_PDU(Z_APDU_presentRequest);
Z_PresentRequest *pr = new_apdu->u.presentRequest;
pr->referenceId = sr->referenceId;
}
else
{
- logf (LOG_LOG, "Yaz_Proxy::result_set_optimize new set");
+ yaz_log (LOG_LOG, "Yaz_Proxy::result_set_optimize new set");
delete m_client->m_last_query;
m_client->m_last_query = this_query;
}
void Yaz_Proxy::recv_Z_PDU(Z_APDU *apdu)
{
- logf (LOG_LOG, "Yaz_Proxy::recv_Z_PDU");
+ yaz_log (LOG_LOG, "Yaz_Proxy::recv_Z_PDU");
// Determine our client.
m_client = get_client(apdu);
if (!m_client)
if (!apdu)
return;
- logf (LOG_LOG, "Yaz_ProxyClient::send_Z_PDU %s", m_client->get_hostname());
+ yaz_log (LOG_LOG, "Yaz_ProxyClient::send_Z_PDU %s",
+ m_client->get_hostname());
// delete other info part from PDU before sending to target
Z_OtherInformation **oi;
void Yaz_Proxy::shutdown()
{
- logf (LOG_LOG, "shutdown (client to proxy)");
+ yaz_log (LOG_LOG, "shutdown (client to proxy)");
// only keep if keep_alive flag and cookie is set...
if (m_keepalive && m_client && m_client->m_cookie[0])
{
void Yaz_ProxyClient::shutdown()
{
- logf (LOG_LOG, "shutdown (proxy to server) %s", get_hostname());
+ yaz_log (LOG_LOG, "shutdown (proxy to server) %s", get_hostname());
delete m_server;
delete this;
}
void Yaz_Proxy::failNotify()
{
- logf (LOG_LOG, "connection closed by client");
+ yaz_log (LOG_LOG, "connection closed by client");
shutdown();
}
void Yaz_ProxyClient::failNotify()
{
- logf (LOG_LOG, "Yaz_ProxyClient connection closed by %s", get_hostname());
+ yaz_log (LOG_LOG, "Yaz_ProxyClient connection closed by %s", get_hostname());
shutdown();
}
void Yaz_ProxyClient::connectNotify()
{
- logf (LOG_LOG, "Yaz_ProxyClient connection accepted by %s",
+ yaz_log (LOG_LOG, "Yaz_ProxyClient connection accepted by %s",
get_hostname());
timeout(600);
}
void Yaz_Proxy::timeoutNotify()
{
- logf (LOG_LOG, "timeout (client to proxy)");
+ yaz_log (LOG_LOG, "timeout (client to proxy)");
shutdown();
}
void Yaz_ProxyClient::timeoutNotify()
{
- logf (LOG_LOG, "timeout (proxy to target) %s", get_hostname());
+ yaz_log (LOG_LOG, "timeout (proxy to target) %s", get_hostname());
shutdown();
}
void Yaz_ProxyClient::recv_Z_PDU(Z_APDU *apdu)
{
m_waiting = 0;
- logf (LOG_LOG, "Yaz_ProxyClient::recv_Z_PDU %s", get_hostname());
+ yaz_log (LOG_LOG, "Yaz_ProxyClient::recv_Z_PDU %s", get_hostname());
if (apdu->which == Z_APDU_searchResponse)
{
m_last_resultCount = *apdu->u.searchResponse->resultCount;
set_otherInformationString (apdu, VAL_COOKIE, 1, m_cookie);
if (m_server)
{
- logf (LOG_LOG, "Yaz_Proxy::send_Z_PDU");
+ yaz_log (LOG_LOG, "Yaz_Proxy::send_Z_PDU");
m_server->send_Z_PDU(apdu);
}
}
* See the file LICENSE for details.
*
* $Log: yaz-socket-manager.cpp,v $
- * Revision 1.15 2001-03-26 14:43:49 adam
+ * Revision 1.16 2001-08-13 16:39:12 adam
+ * PDU_Assoc keeps track of children. Using yaz_log instead of logf.
+ *
+ * Revision 1.15 2001/03/26 14:43:49 adam
* New threaded PDU association.
*
* Revision 1.14 2000/11/20 14:17:36 adam
YazSocketEntry *p;
YazSocketEvent *event = getEvent();
unsigned timeout = 0;
- logf (m_log, "Yaz_SocketManager::processEvent manager=%p", this);
+ yaz_log (m_log, "Yaz_SocketManager::processEvent manager=%p", this);
if (event)
{
event->observer->socketNotify(event->event);
}
if (!no)
{
- logf (m_log, "no pending events return 0");
+ yaz_log (m_log, "no pending events return 0");
if (!m_observers)
- logf (m_log, "no observers");
+ yaz_log (m_log, "no observers");
return 0;
}
to.tv_sec = timeout;
to.tv_usec = 0;
- logf (m_log, "Yaz_SocketManager::select no=%d timeout=%d", no, timeout);
+ yaz_log (m_log, "Yaz_SocketManager::select no=%d timeout=%d", no, timeout);
while ((res = select(max + 1, &in, &out, &except, timeout ? &to : 0)) < 0)
if (errno != EINTR)
return -1;
now >= p->last_activity + (int) (p->timeout))
{
YazSocketEvent *event = new YazSocketEvent;
- logf (m_log, "timeout, now = %ld last_activity=%ld timeout=%d",
+ yaz_log (m_log, "timeout, now = %ld last_activity=%ld timeout=%d",
now, p->last_activity, p->timeout);
p->last_activity = now;
event->observer = p->observer;
* See the file LICENSE for details.
*
* $Log: yaz-z-assoc.cpp,v $
- * Revision 1.20 2001-04-25 18:59:30 adam
+ * Revision 1.21 2001-08-13 16:39:12 adam
+ * PDU_Assoc keeps track of children. Using yaz_log instead of logf.
+ *
+ * Revision 1.20 2001/04/25 18:59:30 adam
* Added referenceId handling for server.
*
* Revision 1.19 2001/03/27 14:47:45 adam
void Yaz_Z_Assoc::recv_PDU(const char *buf, int len)
{
- logf (m_log, "recv_PDU len=%d", len);
+ yaz_log (m_log, "recv_PDU len=%d", len);
Z_APDU *apdu = decode_Z_PDU (buf, len);
if (apdu)
{
if (!z_APDU(m_odr_in, &apdu, 0, 0))
{
- logf(LOG_LOG, "ODR error on incoming PDU: %s [near byte %d] ",
+ yaz_log(LOG_LOG, "ODR error on incoming PDU: %s [near byte %d] ",
odr_errmsg(odr_geterror(m_odr_in)),
odr_offset(m_odr_in));
- logf(LOG_LOG, "PDU dump:");
+ yaz_log(LOG_LOG, "PDU dump:");
odr_dumpBER(yaz_log_file(), buf, len);
return 0;
}
z_APDU(m_odr_print, &apdu, 0, "encode");
if (!z_APDU(m_odr_out, &apdu, 0, 0))
{
- logf (LOG_LOG, "yaz_Z_Assoc::encode_Z_PDU failed");
+ yaz_log (LOG_LOG, "yaz_Z_Assoc::encode_Z_PDU failed");
return -1;
}
*buf = odr_getbuf (m_odr_out, len, 0);
* See the file LICENSE for details.
*
* $Log: yaz-z-server-ursula.cpp,v $
- * Revision 1.4 2001-04-25 19:40:18 adam
+ * Revision 1.5 2001-08-13 16:39:12 adam
+ * PDU_Assoc keeps track of children. Using yaz_log instead of logf.
+ *
+ * Revision 1.4 2001/04/25 19:40:18 adam
* Added refernceId handling for other services.
*
* Revision 1.3 2001/04/11 12:33:42 heikki
if (r->which != ODR_EXTERNAL_octet)
{
- logf (LOG_LOG, "ursula::recv not octet alighed");
+ yaz_log (LOG_LOG, "ursula::recv not octet alighed");
return 0;
}
odr_setbuf (s->odr_decode(), (char*) r->u.octet_aligned->buf,
Z_UrsPDU *pdu = 0;
if (!z_UrsPDU (s->odr_decode(), &pdu, 0, ""))
{
- logf (LOG_LOG, "ursula::decode failed");
+ yaz_log (LOG_LOG, "ursula::decode failed");
return 0;
}
yaz_log (LOG_LOG, "got ursula packet");