Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-chain-global-db
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-chain-global-db
Commits
e1282d0f
Commit
e1282d0f
authored
5 years ago
by
Aleksandr Lysikov
Browse files
Options
Downloads
Patches
Plain Diff
fixed some bugs
parent
722d71e3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dap_chain_global_db.c
+3
-3
3 additions, 3 deletions
dap_chain_global_db.c
with
3 additions
and
3 deletions
dap_chain_global_db.c
+
3
−
3
View file @
e1282d0f
...
@@ -51,7 +51,7 @@ char * extract_group_prefix (const char * a_group)
...
@@ -51,7 +51,7 @@ char * extract_group_prefix (const char * a_group)
}
else
{
}
else
{
l_group_prefix_size
=
(
size_t
)
l_delimeter
-
(
size_t
)
a_group
;
l_group_prefix_size
=
(
size_t
)
l_delimeter
-
(
size_t
)
a_group
;
if
(
l_group_prefix_size
>
1
)
if
(
l_group_prefix_size
>
1
)
l_group_prefix
=
strndup
(
a_group
,
l_group_prefix_size
-
1
);
l_group_prefix
=
strndup
(
a_group
,
l_group_prefix_size
);
}
}
return
l_group_prefix
;
return
l_group_prefix
;
}
}
...
@@ -229,7 +229,7 @@ bool dap_chain_global_db_gr_set(const char *a_key, const void *a_value, size_t a
...
@@ -229,7 +229,7 @@ bool dap_chain_global_db_gr_set(const char *a_key, const void *a_value, size_t a
int
l_res
=
dap_db_add
(
store_data
,
1
);
int
l_res
=
dap_db_add
(
store_data
,
1
);
// Extract prefix if added successfuly, add history log and call notify callback if present
// Extract prefix if added successfuly, add history log and call notify callback if present
if
(
l_res
>
0
){
if
(
!
l_res
){
char
*
l_group_prefix
=
extract_group_prefix
(
a_group
);
char
*
l_group_prefix
=
extract_group_prefix
(
a_group
);
history_group_item_t
*
l_history_group_item
=
NULL
;
history_group_item_t
*
l_history_group_item
=
NULL
;
if
(
l_group_prefix
)
if
(
l_group_prefix
)
...
@@ -249,7 +249,7 @@ bool dap_chain_global_db_gr_set(const char *a_key, const void *a_value, size_t a
...
@@ -249,7 +249,7 @@ bool dap_chain_global_db_gr_set(const char *a_key, const void *a_value, size_t a
pthread_mutex_unlock
(
&
ldb_mutex
);
pthread_mutex_unlock
(
&
ldb_mutex
);
DAP_DELETE
(
store_data
);
DAP_DELETE
(
store_data
);
return
l_res
>
0
;
return
!
l_res
;
}
}
bool
dap_chain_global_db_set
(
const
char
*
a_key
,
const
void
*
a_value
,
size_t
a_value_len
)
bool
dap_chain_global_db_set
(
const
char
*
a_key
,
const
void
*
a_value
,
size_t
a_value_len
)
...
...
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