mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-02 07:15:44 +00:00
Sync with 3.0rc7
This commit is contained in:
@@ -54,13 +54,10 @@ isc_result_t omapi_message_new (omapi_object_t **o, const char *file, int line)
|
||||
omapi_object_t *g;
|
||||
isc_result_t status;
|
||||
|
||||
m = dmalloc (sizeof *m, file, line);
|
||||
if (!m)
|
||||
return ISC_R_NOMEMORY;
|
||||
memset (m, 0, sizeof *m);
|
||||
m -> type = omapi_type_message;
|
||||
rc_register (file, line, &m, m, m -> refcnt);
|
||||
m -> refcnt = 1;
|
||||
m = (omapi_message_object_t *)0;
|
||||
status = omapi_message_allocate (&m, file, line);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
|
||||
g = (omapi_object_t *)0;
|
||||
status = omapi_generic_new (&g, file, line);
|
||||
@@ -84,7 +81,7 @@ isc_result_t omapi_message_new (omapi_object_t **o, const char *file, int line)
|
||||
}
|
||||
|
||||
status = omapi_object_reference (o, (omapi_object_t *)m, file, line);
|
||||
omapi_object_dereference ((omapi_object_t **)&m, file, line);
|
||||
omapi_message_dereference (&m, file, line);
|
||||
omapi_object_dereference (&g, file, line);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
@@ -369,7 +366,36 @@ static const char *omapi_message_op_name(int op) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static isc_result_t
|
||||
omapi_message_process_internal (omapi_object_t *, omapi_object_t *);
|
||||
|
||||
isc_result_t omapi_message_process (omapi_object_t *mo, omapi_object_t *po)
|
||||
{
|
||||
isc_result_t status;
|
||||
#if defined (DEBUG_MEMORY_LEAKAGE)
|
||||
unsigned long previous_outstanding = dmalloc_outstanding;
|
||||
#endif
|
||||
|
||||
status = omapi_message_process_internal (mo, po);
|
||||
|
||||
#if defined (DEBUG_MEMORY_LEAKAGE) && 0
|
||||
log_info ("generation %ld: %ld new, %ld outstanding, %ld long-term",
|
||||
dmalloc_generation,
|
||||
dmalloc_outstanding - previous_outstanding,
|
||||
dmalloc_outstanding, dmalloc_longterm);
|
||||
#endif
|
||||
#if (defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)) && 0
|
||||
dmalloc_dump_outstanding ();
|
||||
#endif
|
||||
#if defined (DEBUG_RC_HISTORY_EXHAUSTIVELY) && 0
|
||||
dump_rc_history ();
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
omapi_message_process_internal (omapi_object_t *mo, omapi_object_t *po)
|
||||
{
|
||||
omapi_message_object_t *message, *m;
|
||||
omapi_object_t *object = (omapi_object_t *)0;
|
||||
|
Reference in New Issue
Block a user