Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Marsaud Smb2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Marsaud Smb2
Commits
d86cc29b
Commit
d86cc29b
authored
Mar 24, 2016
by
wescoeur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SMB Create request code documentation.
parent
fb35fc83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
lib/api/src/createWriteStream.js
lib/api/src/createWriteStream.js
+2
-2
lib/messages/create.js
lib/messages/create.js
+2
-0
lib/structures/constants.js
lib/structures/constants.js
+4
-0
No files found.
lib/api/src/createWriteStream.js
View file @
d86cc29b
...
...
@@ -51,7 +51,7 @@ class SmbWritableStream extends Writable {
const
offset
=
new
Bigint
(
this
.
offset
)
this
.
offset
=
this
.
offset
.
add
(
packetSize
)
const
fiboGen
=
fibonacci
()
const
retryInterval
=
fibonacci
()
let
pending
=
true
while
(
pending
)
{
...
...
@@ -66,7 +66,7 @@ class SmbWritableStream extends Writable {
}
catch
(
error
)
{
if
(
error
.
code
===
'
STATUS_PENDING
'
)
{
await
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(
resolve
,
fiboGen
.
next
().
value
)
setTimeout
(
resolve
,
retryInterval
.
next
().
value
)
})
}
else
{
throw
error
...
...
lib/messages/create.js
View file @
d86cc29b
...
...
@@ -9,6 +9,8 @@ module.exports = message({
var
buffer
=
new
Buffer
(
params
.
path
,
'
ucs2
'
);
var
createDisposition
=
params
.
createDisposition
/* See: https://msdn.microsoft.com/en-us/library/cc246502.aspx
6 values for CreateDisposition. */
if
(
!
(
createDisposition
>=
0
&&
createDisposition
<=
5
))
{
createDisposition
=
FILE_OVERWRITE_IF
}
...
...
lib/structures/constants.js
View file @
d86cc29b
/* Documentation https://msdn.microsoft.com/en-us/library/cc246497.aspx */
module
.
exports
=
{
/* 2.2.13 SMB2 CREATE Request:
https://msdn.microsoft.com/en-us/library/cc246502.aspx */
FILE_SUPERSEDE
:
0x00000000
,
FILE_OPEN
:
0x00000001
,
FILE_CREATE
:
0x00000002
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment