Index: /trunk/FACT++/dim/README_v19.txt
===================================================================
--- /trunk/FACT++/dim/README_v19.txt	(revision 14402)
+++ /trunk/FACT++/dim/README_v19.txt	(revision 14403)
@@ -1,4 +1,4 @@
 
-                    DIM version 19.37 Release Notes
+                    DIM version 19.38 Release Notes
 
 Notes 1 and 2 for Unix Users only
@@ -17,5 +17,11 @@
 		Dns </dev/null >& dns.log &
 
-NOTE 3: The Version Number service provided by servers is now set to 1937.
+NOTE 3: The Version Number service provided by servers is now set to 1938.
+
+09/08/2012
+Changes for version 19.38:
+    - The timeout used by clients and servers to try to reconnect to a DNS was supposed to be random,
+      to avoid all processes retrying at the same time, but it wasn't - fixed.
+
 
 27/06/2012
Index: /trunk/FACT++/dim/dim/dim.h
===================================================================
--- /trunk/FACT++/dim/dim/dim.h	(revision 14402)
+++ /trunk/FACT++/dim/dim/dim.h	(revision 14403)
@@ -14,5 +14,5 @@
 #include "dim_common.h"
 
-#define DIM_VERSION_NUMBER 1937
+#define DIM_VERSION_NUMBER 1938
 
 
@@ -442,5 +442,5 @@
 	TIMR_ENT *timr_ent;
 	int already;
-	char long_task_name[MAX_TASK_NAME*10];
+	char long_task_name[MAX_NAME];
 } DNS_CONNECTION;
 
Index: /trunk/FACT++/dim/src/dns.c
===================================================================
--- /trunk/FACT++/dim/src/dns.c	(revision 14402)
+++ /trunk/FACT++/dim/src/dns.c	(revision 14403)
@@ -525,5 +525,5 @@
 				{
 					strncpy(Dns_conns[conn_id].long_task_name, packet->services[i].service_name,
-						MAX_TASK_NAME*10);
+						MAX_NAME);
 					ptrt = strstr(Dns_conns[conn_id].long_task_name,"/CLIENT_LIST");
 					*ptrt = '\0';
@@ -1570,4 +1570,5 @@
 	int type;
 	
+	if(tag){}
 	if(size)
 	{
Index: /trunk/FACT++/dim/src/open_dns.c
===================================================================
--- /trunk/FACT++/dim/src/open_dns.c	(revision 14402)
+++ /trunk/FACT++/dim/src/open_dns.c	(revision 14403)
@@ -146,4 +146,17 @@
 }
 
+void rand_tmout_init()
+{
+	char pid_str[MAX_TASK_NAME];
+	int ip, pid;
+	extern int get_node_addr();
+	extern int get_proc_name();
+
+	get_node_addr((char *)&ip);
+	get_proc_name(pid_str);
+	sscanf(pid_str,"%d",&pid);
+	srand(ip+pid);
+}
+
 int rand_tmout( int min, int max )
 {
@@ -174,4 +187,5 @@
 		DNS_ids[SRC_DIS] = (DNS_CONN *)sid;
 		DNS_ids[SRC_DIC] = (DNS_CONN *)cid;
+		rand_tmout_init();
 	}
 	ENABLE_AST
