* Copyright (c) 1995-2002, Index Data
* See the file LICENSE for details.
*
- * $Id: oid.c,v 1.50 2002-01-23 20:22:49 adam Exp $
+ * $Id: oid.c,v 1.52 2002-01-29 13:47:33 adam Exp $
*/
/*
struct oident *oident = 0;
nmem_mutex_enter (oid_mutex);
- if (desc)
- oident = oid_getentbyoid_x (oid);
if (!oident)
{
char desc_str[200];
}
oid[i] = val;
oid[i+1] = -1;
- oident = oid_addent (oid, PROTO_GENERAL, CLASS_GENERAL, NULL,
+ oident = oid_getentbyoid_x (oid);
+ if (!oident)
+ oident = oid_addent (oid, PROTO_GENERAL, CLASS_GENERAL, NULL,
VAL_DYNAMIC);
return oident->value;
}
{
oid_transfer (list);
}
+
+void oid_trav (void (*func)(struct oident *oidinfo, void *vp), void *vp)
+{
+ struct oident_list *ol;
+
+ oid_init ();
+ for (ol = oident_table; ol; ol = ol->next)
+ (*func)(&ol->oident, vp);
+}