Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
a5992b86
Commit
a5992b86
authored
13 years ago
by
mcmlxxix
Browse files
Options
Downloads
Patches
Plain Diff
fix bugs caused directly by deuce and no one else but deuce
parent
ca3b525c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/load/json-db.js
+7
-7
7 additions, 7 deletions
exec/load/json-db.js
with
7 additions
and
7 deletions
exec/load/json-db.js
+
7
−
7
View file @
a5992b86
...
...
@@ -347,9 +347,8 @@ function JSONdb (fileName) {
return
true
;
/* if this client has this record locked */
else
if
(
record
.
shadow
[
record
.
child_name
].
_lock
[
client
.
id
]
&&
record
.
shadow
[
record
.
child_name
].
_lock
[
client
.
id
].
type
==
locks
.
WRITE
)
{
record
.
shadow
[
record
.
child_name
].
_lock
[
client
.
id
].
type
==
locks
.
WRITE
)
{
delete
record
.
data
[
record
.
child_name
];
delete
record
.
shadow
[
record
.
child_name
];
/* send data updates to all subscribers */
return
true
;
}
...
...
@@ -708,15 +707,16 @@ function JSONdb (fileName) {
var
p
=
parent_name
.
split
(
/
\.
/
);
for
each
(
var
c
in
p
)
{
/* in the event of a write request, create new data if it does not exist*/
if
(
data
[
c
]
===
undefined
&&
create_new
)
create_data
(
data
,
c
);
/* ensure that the shadow object exists in order to allow for non-read operations */
if
(
shadow
[
c
]
===
undefined
)
create_shadow
(
data
,
c
);
create_shadow
(
shadow
,
c
);
shadow
=
shadow
[
c
];
/* keep track of current object, and store the immediate parent of the request object */
if
(
data
!==
undefined
)
if
(
data
!==
undefined
)
{
if
(
data
[
c
]
===
undefined
&&
create_new
)
create_data
(
data
,
c
);
data
=
data
[
c
];
shadow
=
shadow
[
c
];
}
/* check the current object's lock and subscriber status along the way */
info
=
investigate
(
shadow
,
info
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment