summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/msdfs/msdfs.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/msdfs/msdfs.c b/source/msdfs/msdfs.c
index 2ac7bda1754..c66f0477a84 100644
--- a/source/msdfs/msdfs.c
+++ b/source/msdfs/msdfs.c
@@ -495,15 +495,13 @@ BOOL get_referred_path(char *pathname, struct junction_map *jucn,
*/
if (dp.reqpath[0] == '\0') {
- return self_ref(pathname, jucn, consumedcntp, self_referralp);
- }
-
- pstrcpy(conn_path, lp_pathname(snum));
- if (!create_conn_struct(conn, snum, conn_path))
- return False;
- if (*lp_msdfs_proxy(snum) != '\0') {
struct referral* ref;
+
+ if (*lp_msdfs_proxy(snum) == '\0')
+ return self_ref(pathname, jucn, consumedcntp,
+ self_referralp);
+
jucn->referral_count = 1;
if ((ref = (struct referral*) malloc(sizeof(struct referral))) == NULL) {
DEBUG(0, ("malloc failed for referral\n"));
@@ -522,6 +520,10 @@ BOOL get_referred_path(char *pathname, struct junction_map *jucn,
goto out;
}
+ pstrcpy(conn_path, lp_pathname(snum));
+ if (!create_conn_struct(conn, snum, conn_path))
+ return False;
+
/* If not remote & not a self referral, return False */
if (!resolve_dfs_path(pathname, &dp, conn, False,
&jucn->referral_list, &jucn->referral_count,