Corrected minor parsing errors.
authorShirish Kalele <kalele@samba.org>
Mon, 17 Apr 2000 22:40:02 +0000 (22:40 +0000)
committerShirish Kalele <kalele@samba.org>
Mon, 17 Apr 2000 22:40:02 +0000 (22:40 +0000)
Not adding a Dfs junction to msdfs.tdb if it doesn't have any referred paths
as parsed from the dfsmap file.
(This used to be commit 462ea8b7fdaa528c3e9bfaca4fdd031888157124)

source3/msdfs/msdfs.c
source3/msdfs/parse_dfs_map.c

index 05e1f221b8213aba5acd4e69aa0ca875f9b0ce2a..f1b19dfe02efea5d39dd5aecdc28b25b9e5804b4 100644 (file)
@@ -60,7 +60,7 @@ static BOOL parse_dfs_path(char* pathname, struct dfs_path* pdp)
 */
 
   trim_string(temp,"\\","\\");
-  DEBUG(10,("temp in parse_dfs_path: .%s. after trimming \'s\n",temp));
+  DEBUG(10,("temp in parse_dfs_path: .%s. after trimming \\'s\n",temp));
 
   /* now tokenize */
   /* parse out hostname */
index 24d8ca8b3df44b0f5a28f9eea2d9a44ba8358ee9..df6b89bbfab9bbca87f1dfc0b7064819665695f1 100644 (file)
@@ -50,7 +50,7 @@ static char* Dfs_Crop_Whitespace(char* line)
 
   if(line[0]=='#' || line[0]==';') return NULL;
   
-  for(i=0;i<len && line[i]==' ';i++);
+  for(i=0;i<len && isspace(line[i]);i++);
 
   if(i>=len) return NULL;
   
@@ -168,9 +168,10 @@ static BOOL load_dfsmap(char* fname, int snum)
 
       if(line[0]!='\\')
        {
+         /* a new junction definition encountered */
 
-         /* a junction encountered. add the current junction first */
-         if(junction)
+         /* add the current junction if it has any referrals defined */
+         if(junction && ref_count!=0)
            {
              junction->referral_count = ref_count;
              junction->referral_list = tmp_ref_array;