summaryrefslogtreecommitdiff
path: root/omapip/message.c
diff options
context:
space:
mode:
authorDamien Neil <source@isc.org>2000-08-14 21:58:57 +0000
committerDamien Neil <source@isc.org>2000-08-14 21:58:57 +0000
commite11a162ff44b39f797076a6cffdcc0842a99ee6e (patch)
tree4859fca4a783b14fbe32075acf81faabcaf48551 /omapip/message.c
parent4244dfb75f9e5c644765580a992d9c03a99f3e92 (diff)
downloadisc-dhcp-e11a162ff44b39f797076a6cffdcc0842a99ee6e.tar.gz
Added a number of (#ifdef-guarded) debugging statements.
Diffstat (limited to 'omapip/message.c')
-rw-r--r--omapip/message.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/omapip/message.c b/omapip/message.c
index 7837f487..8c0d7f4e 100644
--- a/omapip/message.c
+++ b/omapip/message.c
@@ -355,6 +355,20 @@ isc_result_t omapi_message_unregister (omapi_object_t *mo)
return ISC_R_SUCCESS;
}
+#ifdef DEBUG_PROTOCOL
+static const char *omapi_message_op_name(int op) {
+ switch (op) {
+ case OMAPI_OP_OPEN: return "OMAPI_OP_OPEN";
+ case OMAPI_OP_REFRESH: return "OMAPI_OP_REFRESH";
+ case OMAPI_OP_UPDATE: return "OMAPI_OP_UPDATE";
+ case OMAPI_OP_STATUS: return "OMAPI_OP_STATUS";
+ case OMAPI_OP_DELETE: return "OMAPI_OP_DELETE";
+ case OMAPI_OP_NOTIFY: return "OMAPI_OP_NOTIFY";
+ default: return "(unknown op)";
+ }
+}
+#endif
+
isc_result_t omapi_message_process (omapi_object_t *mo, omapi_object_t *po)
{
omapi_message_object_t *message, *m;
@@ -369,6 +383,13 @@ isc_result_t omapi_message_process (omapi_object_t *mo, omapi_object_t *po)
return ISC_R_INVALIDARG;
message = (omapi_message_object_t *)mo;
+#ifdef DEBUG_PROTOCOL
+ log_debug ("omapi_message_process(): "
+ "op=%s handle=%#x id=%#x rid=%#x",
+ omapi_message_op_name (message -> op),
+ message -> h, message -> id, message -> rid);
+#endif
+
if (message -> rid) {
for (m = omapi_registered_messages; m; m = m -> next)
if (m -> id == message -> rid)