[Initng-svn] r3994 - initng/trunk/plugins/find

svn at initng.thinktux.net svn at initng.thinktux.net
Wed May 3 00:58:50 CEST 2006


Author: jimmy
Date: Wed May  3 00:58:48 2006
New Revision: 3994

Modified:
   initng/trunk/plugins/find/initng_find.c

Log:
Fix an cirular bug.


Modified: initng/trunk/plugins/find/initng_find.c
==============================================================================
--- initng/trunk/plugins/find/initng_find.c	(original)
+++ initng/trunk/plugins/find/initng_find.c	Wed May  3 00:58:48 2006
@@ -107,12 +107,21 @@
 				while (s[i] && s[i] != '.')
 					i++;
 				s[i] = '\0';
-
-				D_("Service should be \"%s\"\n", s, for_service);
-				if ((tmp = initng_common_parse_service(s)))
+				
+				/*
+				 * this was a bug, becouse initng_common_parse_service calls this function, 
+				 * this coud easy be an cirular bug,
+				 * for now we check so that the new parse word is not the same as for_service
+				 * that was orginally looking for.
+				 */
+				if(strcmp(s, for_service)!=0)
 				{
-					closedir(path);
-					return (tmp);
+					D_("Service %s should be \"%s\"\n", s, for_service);
+					if ((tmp = initng_common_parse_service(s)))
+					{
+						closedir(path);
+						return (tmp);
+					}
 				}
 			}
 		}


More information about the Initng-svn mailing list