static void oids_test_2string_encoded(void) { const gchar* oid; oid = oid_encoded2string(ex3.encoded, ex3.encoded_len); g_assert_cmpstr(oid, ==, ex3.string); }
static void oid_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display _U_, char *buf, unsigned int size _U_) { char* oid_str = oid_encoded2string(NULL, fv->value.bytes->data,fv->value.bytes->len); /* * XXX: * I'm assuming that oid_repr_len is going to be called before to set buf's size. * or else we might have a BO. * I guess that is why this callback is not passed a length. * -- lego */ g_strlcpy(buf,oid_str,OID_REPR_LEN(fv)); wmem_free(NULL, oid_str); }