From 224b7274aec587e4154761688815d003d0327d2a Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 1 Dec 2009 21:49:17 +0100 Subject: [PATCH] Update to use Odr_int --- src/proxyp.h | 2 +- src/yaz-proxy-config.cpp | 4 ++-- src/yaz-proxy.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/proxyp.h b/src/proxyp.h index fa3543b..5ffc8e8 100644 --- a/src/proxyp.h +++ b/src/proxyp.h @@ -175,7 +175,7 @@ class Yaz_ProxyClient : public yazpp_1::Z_Assoc { yazpp_1::Yaz_Z_Databases m_last_databases; char *m_last_resultSetId; int m_last_ok; - int m_last_resultCount; + Odr_int m_last_resultCount; int m_sr_transform; int m_seqno; int m_waiting; diff --git a/src/yaz-proxy-config.cpp b/src/yaz-proxy-config.cpp index 1f640be..47b79b5 100644 --- a/src/yaz-proxy-config.cpp +++ b/src/yaz-proxy-config.cpp @@ -389,7 +389,7 @@ int Yaz_ProxyConfigP::check_type_1_attributes(ODR odr, xmlNodePtr ptrl, if (!el->attributeType) continue; int type = *el->attributeType; - int *value = 0; + Odr_int *value = 0; if (el->which == Z_AttributeValue_numeric && el->value.numeric) value = el->value.numeric; @@ -429,7 +429,7 @@ int Yaz_ProxyConfigP::check_type_1_attributes(ODR odr, xmlNodePtr ptrl, { if (!match_list(*value, match_value)) continue; - sprintf (addinfo_str, "%d", *value); + sprintf (addinfo_str, ODR_INT_PRINTF, *value); } else continue; diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 814c0f8..930f7c2 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -864,13 +864,13 @@ void Yaz_Proxy::display_diagrecs(Z_DiagRec **pp, int num) switch (r->which) { case Z_DefaultDiagFormat_v2Addinfo: - yaz_log(YLOG_LOG, "%sError %d %s:%s", + yaz_log(YLOG_LOG, "%sError " ODR_INT_PRINTF " %s:%s", m_session_str, *r->condition, diagbib1_str(*r->condition), r->u.v2Addinfo); break; case Z_DefaultDiagFormat_v3Addinfo: - yaz_log(YLOG_LOG, "%sError %d %s:%s", + yaz_log(YLOG_LOG, "%sError " ODR_INT_PRINTF " %s:%s", m_session_str, *r->condition, diagbib1_str(*r->condition), r->u.v3Addinfo); @@ -1494,7 +1494,7 @@ int Yaz_Proxy::send_to_client(Z_APDU *apdu) } if (sr->resultCount) { - yaz_log(YLOG_LOG, "%s%d hits", m_session_str, + yaz_log(YLOG_LOG, "%s" ODR_INT_PRINTF " hits", m_session_str, *sr->resultCount); if (*sr->resultCount < 0) { @@ -2310,7 +2310,7 @@ Z_Records *Yaz_Proxy::create_nonSurrogateDiagnostics(ODR odr, { Z_Records *rec = (Z_Records *) odr_malloc (odr, sizeof(*rec)); - int *err = (int *) + Odr_int *err = (Odr_int *) odr_malloc (odr, sizeof(*err)); Z_DiagRec *drec = (Z_DiagRec *) odr_malloc (odr, sizeof(*drec)); -- 1.7.10.4