+void Yaz_ProxyClient::set_idAuthentication(Z_APDU *apdu)
+{
+ Z_IdAuthentication *t = apdu->u.initRequest->idAuthentication;
+
+ odr_reset(m_idAuthentication_odr);
+ z_IdAuthentication(m_idAuthentication_odr, &t, 1, 0);
+ m_idAuthentication_ber_buf =
+ odr_getbuf(m_idAuthentication_odr,
+ &m_idAuthentication_ber_size, 0);
+}
+
+bool Yaz_ProxyClient::compare_charset(Z_APDU *apdu)
+{
+ return true;
+}
+
+bool Yaz_ProxyClient::compare_idAuthentication(Z_APDU *apdu)
+{
+ Z_IdAuthentication *t = apdu->u.initRequest->idAuthentication;
+ ODR odr = odr_createmem(ODR_ENCODE);
+
+ z_IdAuthentication(odr, &t, 1, 0);
+ int sz;
+ char *buf = odr_getbuf(odr, &sz, 0);
+ if (buf && m_idAuthentication_ber_buf
+ && sz == m_idAuthentication_ber_size
+ && !memcmp(m_idAuthentication_ber_buf, buf, sz))
+ {
+ odr_destroy(odr);
+ return true;
+ }
+ odr_destroy(odr);
+ if (!buf && !m_idAuthentication_ber_buf)
+ return true;
+ return false;
+}
+