[Initng-svn] r3840 - initng/trunk/plugins/iparser
svn at initng.thinktux.net
svn at initng.thinktux.net
Wed Apr 19 10:40:29 CEST 2006
Author: jimmy
Date: Wed Apr 19 10:40:27 2006
New Revision: 3840
Modified:
initng/trunk/plugins/iparser/initng_i_parser.c
Log:
Cleanup.
Modified: initng/trunk/plugins/iparser/initng_i_parser.c
==============================================================================
--- initng/trunk/plugins/iparser/initng_i_parser.c (original)
+++ initng/trunk/plugins/iparser/initng_i_parser.c Wed Apr 19 10:40:27 2006
@@ -157,13 +157,15 @@
return (NULL);
}
- /* check if service to find is a filename */
+ /*
+ * check if service to find is a filename.
+ * when searching on a full .i filename, the service
+ * returned is the first entry found in the i.file
+ */
if(service_to_find[0]=='/')
{
/* sending null returns the first found */
- got_serv = parse_file(service_to_find, NULL);
- if(got_serv)
- return(got_serv);
+ return(parse_file(service_to_find, NULL));
}
/*
@@ -591,16 +593,19 @@
set_string(&FROM_FILE, new_service, i_strdup(filename));
-#ifndef NO_CACHE_DB
/* Add this entry to the initng service cache, it might be the next service we are looking for */
initng_service_cache_add(new_service);
-#endif
/* if not watching for anything special */
if(!watch_for)
{
D_("Nothing to wait for\n");
- return (FALSE);
+ /* set matach to the first found, and user may walk the services from that point added */
+ if(!(*match))
+ {
+ (*match) = new_service;
+ }
+ return (TRUE);
}
@@ -619,12 +624,6 @@
return (TRUE);
}
-
-#ifdef NOT_CACHE_DB
- /* if this entry was not added to servce_cache we must free it */
- initng_service_cache_free(new_service);
-#endif
-
D_(" returning true, no match or exact match\n");
/* return null if not */
return (TRUE);
More information about the Initng-svn
mailing list