mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 14:25:41 +00:00
Add tracing support for OMAPI accepts and for listener object instantiation.
This commit is contained in:
@@ -44,7 +44,7 @@
|
|||||||
#include <omapip/omapip_p.h>
|
#include <omapip/omapip_p.h>
|
||||||
|
|
||||||
#if defined (TRACING)
|
#if defined (TRACING)
|
||||||
static omapi_array_t *trace_listeners;
|
omapi_array_t *trace_listeners;
|
||||||
static void trace_listener_accept_input (trace_type_t *, unsigned, char *);
|
static void trace_listener_accept_input (trace_type_t *, unsigned, char *);
|
||||||
static void trace_listener_remember (omapi_listener_object_t *,
|
static void trace_listener_remember (omapi_listener_object_t *,
|
||||||
const char *, int);
|
const char *, int);
|
||||||
@@ -317,7 +317,7 @@ OMAPI_ARRAY_TYPE(omapi_listener, omapi_listener_object_t);
|
|||||||
|
|
||||||
void omapi_listener_trace_setup (void) {
|
void omapi_listener_trace_setup (void) {
|
||||||
trace_listener_accept =
|
trace_listener_accept =
|
||||||
trace_type_register ("listener_accept", (void *)0,
|
trace_type_register ("listener-accept", (void *)0,
|
||||||
trace_listener_accept_input,
|
trace_listener_accept_input,
|
||||||
trace_listener_accept_stop, MDL);
|
trace_listener_accept_stop, MDL);
|
||||||
}
|
}
|
||||||
@@ -336,8 +336,8 @@ static void trace_listener_remember (omapi_listener_object_t *obj,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
status = omapi_listener_array_extend (trace_listeners,
|
status = omapi_listener_array_extend (trace_listeners, obj,
|
||||||
obj, (int *)0, MDL);
|
&obj -> index, MDL);
|
||||||
if (status != ISC_R_SUCCESS)
|
if (status != ISC_R_SUCCESS)
|
||||||
goto foo;
|
goto foo;
|
||||||
}
|
}
|
||||||
@@ -366,6 +366,7 @@ static void trace_listener_accept_input (trace_type_t *ttype,
|
|||||||
obj = (omapi_connection_object_t *)0;
|
obj = (omapi_connection_object_t *)0;
|
||||||
status = omapi_listener_connect (&obj,
|
status = omapi_listener_connect (&obj,
|
||||||
lp, 0, &remote_addr);
|
lp, 0, &remote_addr);
|
||||||
|
omapi_listener_dereference (&lp, MDL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} omapi_array_foreach_end (trace_listeners,
|
} omapi_array_foreach_end (trace_listeners,
|
||||||
|
Reference in New Issue
Block a user