svn commit: samba r21086 - in branches/SAMBA_4_0/source/nbt_server/wins: .

metze at samba.org metze at samba.org
Wed Jan 31 14:05:10 GMT 2007


Author: metze
Date: 2007-01-31 14:05:09 +0000 (Wed, 31 Jan 2007)
New Revision: 21086

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21086

Log:
add some notes

metze
Modified:
   branches/SAMBA_4_0/source/nbt_server/wins/winsserver.c


Changeset:
Modified: branches/SAMBA_4_0/source/nbt_server/wins/winsserver.c
===================================================================
--- branches/SAMBA_4_0/source/nbt_server/wins/winsserver.c	2007-01-31 13:47:52 UTC (rev 21085)
+++ branches/SAMBA_4_0/source/nbt_server/wins/winsserver.c	2007-01-31 14:05:09 UTC (rev 21086)
@@ -642,6 +642,13 @@
 		/* 
 		 * if we haven't found an address in the same subnet, search in ones
 		 * which match the client more
+		 *
+		 * some notes:
+		 *
+		 * it's not "idx = idx % r" but "idx = r % idx"
+		 * because in "a % b" b is the allowed range
+		 * and b-1 is the maximum possible result, so it must be decreasing
+		 * and the above idx == 0 check breaks the while(1) loop.
 		 */
 		idx = r % idx;
 	}



More information about the samba-cvs mailing list