Commit 1a35dea8 authored by Vincent Petry's avatar Vincent Petry Committed by GitHub
Browse files

Merge pull request #24965 from owncloud/streams-0.4.1

update icewind/streams to 0.4.1
parents 82beee57 4d7ca341
Subproject commit 12f9071624285bf465157730fc8d43d7a7d7fbd2
Subproject commit 509385e674563e48a977bf8285c826963835528e
......@@ -9,7 +9,7 @@
},
"require": {
"icewind/smb": "1.1.0",
"icewind/streams": "0.4"
"icewind/streams": "0.4.1"
}
}
......@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "8de0823d3d0a167ee24450a111cb67b9",
"content-hash": "6733058865c1765823b31cfbb24552e1",
"hash": "8ed3150b0b3e916ad66558242b4cf2a0",
"content-hash": "70722dcee13b3ac1c1951479b7431c97",
"packages": [
{
"name": "icewind/smb",
......@@ -51,16 +51,16 @@
},
{
"name": "icewind/streams",
"version": "0.4.0",
"version": "0.4.1",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/Streams.git",
"reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3"
"reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/icewind1991/Streams/zipball/9ca40274645a967ecc3408b0ca2e6255ead1d1d3",
"reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3",
"url": "https://api.github.com/repos/icewind1991/Streams/zipball/d3620e8dc410c86c2ba55579803679c4e0b289ac",
"reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac",
"shasum": ""
},
"require": {
......@@ -88,7 +88,7 @@
}
],
"description": "A set of generic stream wrappers",
"time": "2016-03-17 12:32:25"
"time": "2016-06-02 14:37:52"
}
],
"packages-dev": [],
......
......@@ -42,13 +42,6 @@ return array(
'Icewind\\SMB\\Server' => $vendorDir . '/icewind/smb/src/Server.php',
'Icewind\\SMB\\Share' => $vendorDir . '/icewind/smb/src/Share.php',
'Icewind\\SMB\\System' => $vendorDir . '/icewind/smb/src/System.php',
'Icewind\\SMB\\Test\\AbstractShare' => $vendorDir . '/icewind/smb/tests/AbstractShare.php',
'Icewind\\SMB\\Test\\NativeShare' => $vendorDir . '/icewind/smb/tests/NativeShare.php',
'Icewind\\SMB\\Test\\NativeStream' => $vendorDir . '/icewind/smb/tests/NativeStream.php',
'Icewind\\SMB\\Test\\Parser' => $vendorDir . '/icewind/smb/tests/Parser.php',
'Icewind\\SMB\\Test\\Server' => $vendorDir . '/icewind/smb/tests/Server.php',
'Icewind\\SMB\\Test\\Share' => $vendorDir . '/icewind/smb/tests/Share.php',
'Icewind\\SMB\\Test\\TestCase' => $vendorDir . '/icewind/smb/tests/TestCase.php',
'Icewind\\SMB\\TimeZoneProvider' => $vendorDir . '/icewind/smb/src/TimeZoneProvider.php',
'Icewind\\Streams\\CallbackWrapper' => $vendorDir . '/icewind/streams/src/CallbackWrapper.php',
'Icewind\\Streams\\Directory' => $vendorDir . '/icewind/streams/src/Directory.php',
......@@ -60,14 +53,6 @@ return array(
'Icewind\\Streams\\Path' => $vendorDir . '/icewind/streams/src/Path.php',
'Icewind\\Streams\\RetryWrapper' => $vendorDir . '/icewind/streams/src/RetryWrapper.php',
'Icewind\\Streams\\SeekableWrapper' => $vendorDir . '/icewind/streams/src/SeekableWrapper.php',
'Icewind\\Streams\\Tests\\DirectoryFilter' => $vendorDir . '/icewind/streams/tests/DirectoryFilter.php',
'Icewind\\Streams\\Tests\\DirectoryWrapper' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php',
'Icewind\\Streams\\Tests\\DirectoryWrapperDummy' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php',
'Icewind\\Streams\\Tests\\DirectoryWrapperNull' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php',
'Icewind\\Streams\\Tests\\PartialWrapper' => $vendorDir . '/icewind/streams/tests/RetryWrapper.php',
'Icewind\\Streams\\Tests\\RetryWrapper' => $vendorDir . '/icewind/streams/tests/RetryWrapper.php',
'Icewind\\Streams\\Tests\\SeekableWrapper' => $vendorDir . '/icewind/streams/tests/SeekableWrapper.php',
'Icewind\\Streams\\Tests\\UrlCallBack' => $vendorDir . '/icewind/streams/tests/UrlCallBack.php',
'Icewind\\Streams\\Url' => $vendorDir . '/icewind/streams/src/Url.php',
'Icewind\\Streams\\UrlCallback' => $vendorDir . '/icewind/streams/src/UrlCallBack.php',
'Icewind\\Streams\\Wrapper' => $vendorDir . '/icewind/streams/src/Wrapper.php',
......
[
{
"name": "icewind/streams",
"version": "0.4.0",
"version_normalized": "0.4.0.0",
"name": "icewind/smb",
"version": "v1.1.0",
"version_normalized": "1.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/Streams.git",
"reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3"
"url": "https://github.com/icewind1991/SMB.git",
"reference": "822f924967c68228555cea84ea44765f8e85c601"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/icewind1991/Streams/zipball/9ca40274645a967ecc3408b0ca2e6255ead1d1d3",
"reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3",
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/822f924967c68228555cea84ea44765f8e85c601",
"reference": "822f924967c68228555cea84ea44765f8e85c601",
"shasum": ""
},
"require": {
"icewind/streams": ">=0.2.0",
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
"satooshi/php-coveralls": "v1.0.0"
},
"time": "2016-03-17 12:32:25",
"time": "2016-04-26 13:26:39",
"type": "library",
"installation-source": "dist",
"installation-source": "source",
"autoload": {
"psr-4": {
"Icewind\\Streams\\Tests\\": "tests/",
"Icewind\\Streams\\": "src/"
"Icewind\\SMB\\": "src/",
"Icewind\\SMB\\Test\\": "tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
......@@ -40,38 +41,37 @@
"email": "icewind@owncloud.com"
}
],
"description": "A set of generic stream wrappers"
"description": "php wrapper for smbclient and libsmbclient-php"
},
{
"name": "icewind/smb",
"version": "v1.1.0",
"version_normalized": "1.1.0.0",
"name": "icewind/streams",
"version": "0.4.1",
"version_normalized": "0.4.1.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/SMB.git",
"reference": "822f924967c68228555cea84ea44765f8e85c601"
"url": "https://github.com/icewind1991/Streams.git",
"reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/822f924967c68228555cea84ea44765f8e85c601",
"reference": "822f924967c68228555cea84ea44765f8e85c601",
"url": "https://api.github.com/repos/icewind1991/Streams/zipball/d3620e8dc410c86c2ba55579803679c4e0b289ac",
"reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac",
"shasum": ""
},
"require": {
"icewind/streams": ">=0.2.0",
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
"satooshi/php-coveralls": "v1.0.0"
},
"time": "2016-04-26 13:26:39",
"time": "2016-06-02 14:37:52",
"type": "library",
"installation-source": "source",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Icewind\\SMB\\": "src/",
"Icewind\\SMB\\Test\\": "tests/"
"Icewind\\Streams\\Tests\\": "tests/",
"Icewind\\Streams\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
......@@ -84,6 +84,6 @@
"email": "icewind@owncloud.com"
}
],
"description": "php wrapper for smbclient and libsmbclient-php"
"description": "A set of generic stream wrappers"
}
]
......@@ -44,7 +44,7 @@ class RetryWrapper extends Wrapper {
$result = parent::stream_read($count);
$bytesReceived = strlen($result);
while ($bytesReceived < $count && !$this->stream_eof()) {
while (strlen($result) > 0 && $bytesReceived < $count && !$this->stream_eof()) {
$result .= parent::stream_read($count - $bytesReceived);
$bytesReceived = strlen($result);
}
......@@ -54,11 +54,13 @@ class RetryWrapper extends Wrapper {
public function stream_write($data) {
$bytesToSend = strlen($data);
$result = parent::stream_write($data);
$bytesWritten = parent::stream_write($data);
$result = $bytesWritten;
while ($result < $bytesToSend && !$this->stream_eof()) {
while ($bytesWritten > 0 && $result < $bytesToSend && !$this->stream_eof()) {
$dataLeft = substr($data, $result);
$result += parent::stream_write($dataLeft);
$bytesWritten = parent::stream_write($dataLeft);
$result += $bytesWritten;
}
return $result;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment