summaryrefslogtreecommitdiff
path: root/source3/msdfs/parse_dfs_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/msdfs/parse_dfs_map.c')
-rw-r--r--source3/msdfs/parse_dfs_map.c54
1 files changed, 28 insertions, 26 deletions
diff --git a/source3/msdfs/parse_dfs_map.c b/source3/msdfs/parse_dfs_map.c
index 30bd010089..2db32e21fd 100644
--- a/source3/msdfs/parse_dfs_map.c
+++ b/source3/msdfs/parse_dfs_map.c
@@ -50,9 +50,9 @@ static char* Dfs_Crop_Whitespace(char* line)
if(line[0]=='#' || line[0]==';') return NULL;
- for(i=0;i<PSTRING_LEN && line[i]==' ';i++);
+ for(i=0;i<len && line[i]==' ';i++);
- if(i>=PSTRING_LEN) return NULL;
+ if(i>=len) return NULL;
line = &line[i];
@@ -71,7 +71,7 @@ static char* Dfs_Crop_Whitespace(char* line)
return line;
}
-BOOL parse_referral(char* s, struct referral* ref)
+static BOOL parse_referral(char* s, struct referral* ref)
{
#define MAXTOK_IN_REFERRAL 3
char *tok[MAXTOK_IN_REFERRAL+1];
@@ -111,29 +111,7 @@ BOOL parse_referral(char* s, struct referral* ref)
return True;
}
-void load_dfsmaps(void)
-{
- int i=0;
- if(!lp_host_msdfs())
- return;
-
- for(i=0;*lp_servicename(i) && *lp_dfsmap(i)
- && !lp_dfsmap_loaded(i);i++)
- {
- char* dfsmapfile = lp_dfsmap(i);
- DEBUG(4,("loading dfsmap for servicename: %s\n",lp_servicename(i)));
- if(load_dfsmap(dfsmapfile,i))
- {
- set_dfsmap_loaded(i,True);
- }
- else
- {
- DEBUG(0,("handle_dfsmap: Unable to load Dfs map file %s.\nService %s not using MS Dfs",dfsmapfile,lp_servicename(i)));
- set_dfsmap_loaded(i,False);
- }
-
- }
-}
+
BOOL load_dfsmap(char* fname, int snum)
{
@@ -243,6 +221,30 @@ BOOL load_dfsmap(char* fname, int snum)
msdfs_close();
return True;
}
+
+void load_dfsmaps(void)
+{
+ int i=0;
+ if(!lp_host_msdfs())
+ return;
+
+ for(i=0;*lp_servicename(i) && *lp_dfsmap(i)
+ && !lp_dfsmap_loaded(i);i++)
+ {
+ char* dfsmapfile = lp_dfsmap(i);
+ DEBUG(4,("loading dfsmap for servicename: %s\n",lp_servicename(i)));
+ if(load_dfsmap(dfsmapfile,i))
+ {
+ set_dfsmap_loaded(i,True);
+ }
+ else
+ {
+ DEBUG(0,("handle_dfsmap: Unable to load Dfs map file %s.\nService %s not using MS Dfs",dfsmapfile,lp_servicename(i)));
+ set_dfsmap_loaded(i,False);
+ }
+
+ }
+}
#else
/* Stub function if MS_DFS is not defined */