projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d04010
)
Cleaned up config dump so there are no nulls in the dump
author
Art Cancro
<ajc@citadel.org>
Wed, 12 Jul 2023 02:32:37 +0000
(17:32 -0900)
committer
Art Cancro
<ajc@citadel.org>
Wed, 12 Jul 2023 02:32:37 +0000
(17:32 -0900)
citadel/utils/ctdldump.c
patch
|
blob
|
history
diff --git
a/citadel/utils/ctdldump.c
b/citadel/utils/ctdldump.c
index 222545092fe189d2b0ca9b4afdcacef7ed7ddd2e..37064d3f86896b648aeec68f405ca8871f883fad 100644
(file)
--- a/
citadel/utils/ctdldump.c
+++ b/
citadel/utils/ctdldump.c
@@
-335,13
+335,11
@@
void export_usersbynumber(int which_cdb, DBT *in_key, DBT *in_data) {
// export function for a config record
void export_config(int which_cdb, DBT *in_key, DBT *in_data) {
- size_t keylen = in_key->size;
- printf("config|");
- fwrite(in_data->data, keylen, 1, stdout);
+ printf("config|%s|%s|\n",
+ (char *)in_data->data,
+ (char *)in_data->data + strlen(in_data->data) + 1
+ );
- printf("|");
- fwrite(in_data->data + keylen, in_data->size - keylen, 1, stdout);
- printf("|\n");
}