-/*************************************************
-* Sort addresses when testing *
-*************************************************/
-
-/* This function is called only when running in the test harness. It sorts a
-number of multihomed host IP addresses into the order, so as to get
-repeatability. This doesn't have to be efficient. But don't interchange IPv4
-and IPv6 addresses!
-
-NOTE:
-This sorting is not necessary for the new test harness, because it
-doesn't call the real DNS resolver, and its output is repeatable. However,
-until the old test harness is discarded, we need to retain this capability.
-The new harness is being developed towards the end of 2005. It will be some
-time before it can do everything that the old one can do.
-
-Arguments:
- host -> the first host item
- last -> the last host item
-
-Returns: nothing
-*/
-
-static void
-sort_addresses(host_item *host, host_item *last)
-{
-BOOL done = FALSE;
-while (!done)
- {
- host_item *h;
- done = TRUE;
- for (h = host; h != last; h = h->next)
- {
- if ((Ustrchr(h->address, ':') == NULL) !=
- (Ustrchr(h->next->address, ':') == NULL))
- continue;
- if (Ustrcmp(h->address, h->next->address) > 0)
- {
- uschar *temp = h->address;
- h->address = h->next->address;
- h->next->address = temp;
- done = FALSE;
- }
- }
- }
-}
-
-
-