Index: trunk/docs/Changelog
===================================================================
--- trunk/docs/Changelog	(revision 269)
+++ trunk/docs/Changelog	(revision 270)
@@ -1,2 +1,6 @@
+2.6.2:
+	* fix bug in the server function to probe for necessity
+	  of configuration reload for client
+
 2.6.1b (23-12-2009):
 	* fix missing include for sh_inotify.h in sh_inotify.c
Index: trunk/src/sh_forward.c
===================================================================
--- trunk/src/sh_forward.c	(revision 269)
+++ trunk/src/sh_forward.c	(revision 270)
@@ -3630,6 +3630,6 @@
 		    {
 		      TPT((0, FIL__, __LINE__, _("msg=<update status>\n")));
-		      if (0 != sl_strcmp(conn->buf, 
-					 _("Runtime configuration reloaded")))
+		      if (NULL != sl_strstr(conn->buf, 
+					    _("Runtime configuration reloaded")))
 			{
 			  sh_socket_add2reload (conn->client_entry->hostname);
Index: trunk/src/sh_socket.c
===================================================================
--- trunk/src/sh_socket.c	(revision 269)
+++ trunk/src/sh_socket.c	(revision 270)
@@ -23,4 +23,5 @@
  * #define SH_DEBUG_SOCKET
  */
+
 #if defined(SH_WITH_SERVER) && defined(__linux__)
 #define _GNU_SOURCE
@@ -180,4 +181,7 @@
       if (0 == sl_strcmp(new->clt, clt))
 	{
+#ifdef SH_DEBUG_SOCKET
+	  fprintf(stderr, "add2reload: time reset for %s\n", clt);
+#endif
 	  sl_strlcpy (new->clt, clt, SH_MAXMSGLEN);
 	  new->cti = time(NULL);
@@ -188,4 +192,7 @@
 
   new = SH_ALLOC(sizeof(struct reload_cmd));
+#ifdef SH_DEBUG_SOCKET
+  fprintf(stderr, "add2reload: time set for %s\n", clt);
+#endif
   sl_strlcpy (new->clt, clt, SH_MAXMSGLEN);
   new->cti = time(NULL);
@@ -202,5 +209,5 @@
 static void sh_socket_add2list (struct socket_cmd * in);
 
-static void sh_socket_probe4reload (void)
+void sh_socket_probe4reload (void)
 {
   struct reload_cmd  * new;
@@ -215,11 +222,22 @@
   struct stat buf;
 
+#ifdef SH_DEBUG_SOCKET
+  fprintf(stderr, "PROBE\n");
+#endif
+
   for (item = (client_t *) zAVLFirst(&avlcursor, all_clients); item;
        item = (client_t *) zAVLNext(&avlcursor))
     {
+#ifdef SH_DEBUG_SOCKET
+      fprintf(stderr, "%s %d\n", item->hostname, (int)item->status_now);
+#endif
+
       if (item->status_now != CLT_INACTIVE)
 	{
 	  file = get_client_conf_file (item->hostname, &dummy);
 
+#ifdef SH_DEBUG_SOCKET
+	  fprintf(stderr, "%s\n", file);
+#endif
 	  if (0 == stat (file, &buf))
 	    {
@@ -227,6 +245,14 @@
 	      while (new)
 		{
+#ifdef SH_DEBUG_SOCKET
+		  fprintf(stderr, "%s <> %s\n", new->clt, item->hostname);
+#endif
 		  if (0 == sl_strcmp(new->clt, item->hostname))
 		    {
+#ifdef SH_DEBUG_SOCKET
+		      fprintf(stderr, "%lu <> %lu\n", 
+			      (unsigned long) buf.st_mtime, 
+			      (unsigned long)new->cti);
+#endif
 		      if (buf.st_mtime > new->cti)
 			{
@@ -819,4 +845,7 @@
       if (sl_strlen(cmd) >= SH_MAXMSGLEN)
 	{
+#ifdef SH_DEBUG_SOCKET
+	  fprintf (stderr, "Server: command too long: %s\n", cmd);
+#endif
 	  sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
 			  _("Bad message format: command too long"), 
@@ -827,4 +856,7 @@
       else if (sl_strlen(clt) >= SH_MAXMSGLEN)
 	{
+#ifdef SH_DEBUG_SOCKET
+	  fprintf (stderr, "Server: hostname too long: %s\n", clt);
+#endif
 	  sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
 			  _("Bad message format: hostname too long"), 
@@ -836,4 +868,7 @@
 	  cmd[2] == 'S' && cmd[3] == 'T')
 	{
+#ifdef SH_DEBUG_SOCKET
+	  fprintf (stderr, "Server: list %s\n", clt);
+#endif
 	  goto list_all;
 	}
@@ -841,5 +876,11 @@
 	  cmd[2] == 'O' && cmd[3] == 'B' && cmd[4] == 'E')
 	{
+#ifdef SH_DEBUG_SOCKET
+	  fprintf (stderr, "Server: probe start %s\n", clt);
+#endif
 	  sh_socket_probe4reload();
+#ifdef SH_DEBUG_SOCKET
+	  fprintf (stderr, "Server: probe done  %s\n", clt);
+#endif
 	  cmd[0] = 'L'; cmd[1] = 'I'; cmd[2] = 'S'; cmd[3] = 'T';cmd[4] = '\0';
 	  goto list_all;
@@ -851,4 +892,7 @@
   else
     {
+#ifdef SH_DEBUG_SOCKET
+      fprintf (stderr, "Server: bad message\n");
+#endif
       sh_error_handle((-1), FIL__, __LINE__, errno, MSG_E_SUBGEN,
 		      _("Bad message format"), 
@@ -965,4 +1009,7 @@
   sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd));
   sl_strlcpy (new->clt, in->clt, sizeof(new->clt));
+#ifdef SH_DEBUG_SOCKET
+  fprintf(stderr, "add2list: time set for %s\n", new->clt);
+#endif
   (void) sh_unix_time(0, new->cti, sizeof(new->cti));
   new->next = cmdlist;
@@ -983,4 +1030,7 @@
 	  sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd));
 	  sl_strlcpy (new->clt, in->clt, sizeof(new->clt));
+#ifdef SH_DEBUG_SOCKET
+	  fprintf(stderr, "add2run: time reset for %s\n", new->clt);
+#endif
 	  (void) sh_unix_time(0, new->cti, sizeof(new->cti));
 	  return;
@@ -992,4 +1042,7 @@
   sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd));
   sl_strlcpy (new->clt, in->clt, sizeof(new->clt));
+#ifdef SH_DEBUG_SOCKET
+  fprintf(stderr, "add2run: time set for %s\n", new->clt);
+#endif
   (void) sh_unix_time(0, new->cti, sizeof(new->cti));
   new->next = runlist;
