+/*********************************************************************
+ *
+ * Function : connection_detail_matches
+ *
+ * Description : Helper function for connection_destination_matches().
+ * Compares strings which can be NULL.
+ *
+ * Parameters :
+ * 1 : connection_detail = The connection detail to compare.
+ * 2 : fowarder_detail = The forwarder detail to compare.
+ *
+ * Returns : TRUE for yes, FALSE otherwise.
+ *
+ *********************************************************************/
+static int connection_detail_matches(const char *connection_detail,
+ const char *forwarder_detail)
+{
+ if (connection_detail == NULL && forwarder_detail == NULL)
+ {
+ /* Both details are unset. */
+ return TRUE;
+ }
+
+ if ((connection_detail == NULL && forwarder_detail != NULL)
+ || (connection_detail != NULL && forwarder_detail == NULL))
+ {
+ /* Only one detail isn't set. */
+ return FALSE;
+ }
+
+ /* Both details are set, but do they match? */
+ return(!strcmpic(connection_detail, forwarder_detail));
+
+}
+
+