Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-11-19 03:23:11 +0400
committerMorris Jobke <morris.jobke@gmail.com>2013-11-19 03:23:11 +0400
commitb55a66187c4abed63218460b675d555f82ab9142 (patch)
tree1baa03a9d8423ff4dd468055298037b115b4bc20 /apps
parent4a0d295e4ad2546049919a893ad219944466536a (diff)
parent7e6f3817d07645be5b56becca6ba1a6934f6a2c2 (diff)
Merge pull request #5916 from owncloud/extstorage-smb-ignorenetbioserror
SMB ignore connection errors when NetBIOS is disabled
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/3rdparty/smb4php/smb.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_external/3rdparty/smb4php/smb.php b/apps/files_external/3rdparty/smb4php/smb.php
index 1a6cd05590c..9650f809041 100644
--- a/apps/files_external/3rdparty/smb4php/smb.php
+++ b/apps/files_external/3rdparty/smb4php/smb.php
@@ -127,6 +127,7 @@ class smb {
$old_locale = getenv('LC_ALL');
putenv('LC_ALL=en_US.UTF-8');
$output = popen (SMB4PHP_SMBCLIENT." -N {$auth} {$options} {$port} {$options} {$params} 2>/dev/null", 'r');
+ $gotInfo = false;
$info = array ();
$info['info']= array ();
$mode = '';
@@ -188,7 +189,12 @@ class smb {
}
trigger_error($regs[0].' params('.$params.')', E_USER_ERROR);
case 'error-connect':
- return false;
+ // connection error can happen after obtaining share list if
+ // NetBIOS is disabled/blocked on the target server,
+ // in which case we keep the info and continue
+ if (!$gotInfo) {
+ return false;
+ }
}
if ($i) switch ($i[1]) {
case 'file':
@@ -196,6 +202,7 @@ class smb {
case 'disk':
case 'server':
case 'workgroup': $info[$i[1]][] = $i[0];
+ $gotInfo = true;
}
}
pclose($output);