PUD: update 2 error reports
authorFerry Huberts <f.huberts@mindef.nl>
Thu, 4 Aug 2011 11:30:39 +0000 (13:30 +0200)
committerFerry Huberts <f.huberts@mindef.nl>
Thu, 18 Aug 2011 13:25:24 +0000 (15:25 +0200)
Signed-off-by: Ferry Huberts <f.huberts@mindef.nl>
lib/pud/src/nodeIdConversion.c

index 256c6a5..7956464 100644 (file)
@@ -82,10 +82,9 @@ size_t setupNodeInfoForOlsr(PudOlsrWireFormat * olsrGpsMessage,
                        return 0;
 
                default: /* unsupported */
                        return 0;
 
                default: /* unsupported */
-                       pudError(false, "Configuration of unsupported %s %u, using %u",
-                                       PUD_NODE_ID_TYPE_NAME, nodeIdTypeNumber,
-                                       ((olsr_cnf->ip_version == AF_INET) ? PUD_NODEIDTYPE_IPV4
-                                                       : PUD_NODEIDTYPE_IPV6));
+                       pudError(false, "Configuration of unsupported %s %u,"
+                                       " falling back to IP address", PUD_NODE_ID_TYPE_NAME,
+                                       nodeIdTypeNumber);
 
                        /* fallback to IP address */
                        olsrGpsMessage->nodeInfo.nodeIdType = (olsr_cnf->ip_version
 
                        /* fallback to IP address */
                        olsrGpsMessage->nodeInfo.nodeIdType = (olsr_cnf->ip_version
@@ -224,12 +223,9 @@ void getNodeIdStringFromOlsr(int ipVersion, union olsr_message *olsrMessage,
                                goto noId;
 
                        default: /* unsupported */
                                goto noId;
 
                        default: /* unsupported */
-                               pudError(false,
-                                               "Reception of unsupported %s %u, using %u",
-                                               PUD_NODE_ID_TYPE_NAME,
-                                               olsrGpsMessage->nodeInfo.nodeIdType,
-                                               ((ipVersion == AF_INET) ? PUD_NODEIDTYPE_IPV4
-                                                               : PUD_NODEIDTYPE_IPV6));
+                               pudError(false, "Reception of unsupported %s %u,"
+                                               " falling back to IP address", PUD_NODE_ID_TYPE_NAME,
+                                               olsrGpsMessage->nodeInfo.nodeIdType);
                                olsrGpsMessage->smask &= ~PUD_FLAGS_ID;
                                goto noId;
                }
                                olsrGpsMessage->smask &= ~PUD_FLAGS_ID;
                                goto noId;
                }