changeset 952:17ac99255475

Be explicit which entry already exists in the dictionary.
author Thomas Klausner <tk@giga.or.at>
date Fri, 22 Feb 2013 00:06:07 +0100
parents f97fa305467f
children d35276067342
files libfdproto/dictionary.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libfdproto/dictionary.c	Thu Feb 21 12:28:21 2013 +0100
+++ b/libfdproto/dictionary.c	Fri Feb 22 00:06:07 2013 +0100
@@ -1721,6 +1721,7 @@
 		/* We have a duplicate key in locref. Check if the pointed object is the same or not */
 		switch (type) {
 			case DICT_VENDOR:
+				TRACE_DEBUG(FULL, "Vendor %s already in dictionary", new->data.vendor.vendor_name);
 				/* if we are here, it means the two vendors id are identical */
 				if (fd_os_cmp(locref->data.vendor.vendor_name, locref->datastr_len, 
 						new->data.vendor.vendor_name, new->datastr_len)) {
@@ -1732,6 +1733,7 @@
 				break;
 
 			case DICT_APPLICATION:
+				TRACE_DEBUG(FULL, "Application %s already in dictionary", new->data.application.application_name);
 				/* got same id */
 				if (fd_os_cmp(locref->data.application.application_name, locref->datastr_len, 
 						new->data.application.application_name, new->datastr_len)) {
@@ -1742,6 +1744,7 @@
 				break;
 
 			case DICT_TYPE:
+				TRACE_DEBUG(FULL, "Type %s already in dictionary", new->data.type.type_name);
 				/* got same name */
 				if (locref->data.type.type_base != new->data.type.type_base) {
 					TRACE_DEBUG(FULL, "Conflicting base type");
@@ -1764,6 +1767,7 @@
 				break;
 
 			case DICT_ENUMVAL:
+				TRACE_DEBUG(FULL, "Enum %s already in dictionary", new->data.enumval.enum_name);
 				/* got either same name or same value. We check that both are true */
 				if (order_enum_by_name(locref, new)) {
 					TRACE_DEBUG(FULL, "Conflicting enum name");
@@ -1777,6 +1781,7 @@
 				break;
 
 			case DICT_AVP:
+				TRACE_DEBUG(FULL, "AVP %s already in dictionary", new->data.avp.avp_name);
 				/* got either same name or code */
 				if (order_avp_by_code(locref, new)) {
 					TRACE_DEBUG(FULL, "Conflicting AVP code");
@@ -1806,6 +1811,7 @@
 				break;
 
 			case DICT_COMMAND:
+				TRACE_DEBUG(FULL, "Command %s already in dictionary", new->data.cmd.cmd_name);
 				/* We got either same name, or same code + R flag */
 				if (order_cmd_by_name(locref, new)) {
 					TRACE_DEBUG(FULL, "Conflicting command name");
"Welcome to our mercurial repository"