i've started (but haven't finished) working the fixes for bongo-config so
install would work. here is a patch. the issue is that when we get to
line 669
(BongoArray ) *config.domains->value.arrayVal
is getting overwritten or freed somewhere. My guess is that it is around
line 112, but i didn't have time to get that far.
Index: src/apps/config/config.c
===================================================================
--- src/apps/config/config.c (revision 1081)
+++ src/apps/config/config.c (working copy)
@@ -70,6 +70,7 @@
/* this is a little messy here due to the way the array works */
if (!config.domains) {
+ config.domains = BongoJsonNodeNewArray(BongoArrayNew(sizeof(char *), 1));
while (1) {
char *tmp = NULL;
BongoJsonNode *domain;
@@ -77,7 +78,7 @@
GetInteractiveData(_("Mail Domains (one per line, blank line to finish):"), &tmp, "");
if ((tmp == NULL) || (tmp[0] == '\0')) return;
- BongoJsonArrayAppendString(config.domains, tmp);
+ BongoJsonArrayAppendString(BongoJsonNodeAsArray(config.domains), tmp);
tmp = NULL;
}
}
@@ -547,7 +548,6 @@
// this just clears up a warning. we don't need this here
GlobalConfig[0].type = BONGO_JSON_NULL;
- config.domains = BongoJsonNodeNewArray(BongoArrayNew(sizeof(char *), 1));
// parse options
while (++next_arg < argc && argv[next_arg][0] == '-') {
@@ -564,7 +564,10 @@
config.dns = MemStrdup(argv[next_arg]);
} else if (!strcmp(arg, "--domain")) {
next_arg++;
- BongoJsonArrayAppendString(config.domains, MemStrdup(argv[next_arg]));
+ if (!config.domains) {
+ config.domains = BongoJsonNodeNewArray(BongoArrayNew(sizeof(char *), 1));
+ }
+ BongoJsonArrayAppendString(BongoJsonNodeAsArray(config.domains), MemStrdup(argv[next_arg]));
} else {
printf("Unrecognized option: %s\n", argv[next_arg]);
}_______________________________________________
Bongo-devel mailing list
[email protected]
https://mail.gna.org/listinfo/bongo-devel