s4-interfaces: keep interfaces in the order they were declared
authorAndrew Tridgell <tridge@samba.org>
Sun, 8 May 2011 10:55:41 +0000 (12:55 +0200)
committerAndrew Tridgell <tridge@samba.org>
Sun, 8 May 2011 11:57:58 +0000 (13:57 +0200)
the spoolss notify test depends on the interfaces order

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun May  8 13:57:58 CEST 2011 on sn-devel-104

source4/lib/socket/interface.c

index 4eb4f3a5175a2b15878eaaa725c2e5b45b9966d6..b762f5573a11db293b7e4fa532d3069ba2431684 100644 (file)
@@ -129,7 +129,11 @@ static void add_interface(TALLOC_CTX *mem_ctx, const struct iface_struct *ifs, s
        DEBUG(2,("netmask=%s\n", addr));
        iface->nmask_s = talloc_strdup(iface, addr);
 
-       DLIST_ADD(*interfaces, iface);
+       /*
+          this needs to be a ADD_END, as some tests (such as the
+          spoolss notify test) depend on the interfaces ordering
+       */
+       DLIST_ADD_END(*interfaces, iface, NULL);
 }
 
 /**