Commit fbf30f3e authored by Daniel Salzman's avatar Daniel Salzman

knot1to2: add groups processing

parent 391d0324
This diff is collapsed.
......@@ -119,7 +119,7 @@ extern int cf_debug;
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
#line 323 "cf-parse.y" /* yacc.c:1909 */
#line 361 "cf-parse.y" /* yacc.c:1909 */
struct {
char *t;
......
This diff is collapsed.
......@@ -98,6 +98,25 @@ static int convert(const char *file_out, const char *file_in)
}
hattrie_iter_free(it);
// Remove groups data.
it = hattrie_iter_begin(share.groups, false);
for (; !hattrie_iter_finished(it); hattrie_iter_next(it)) {
hattrie_t *trie = *hattrie_iter_val(it);
if (trie == NULL) {
continue;
}
hattrie_iter_t *it2 = hattrie_iter_begin(trie, false);
for (; !hattrie_iter_finished(it2); hattrie_iter_next(it2)) {
char *data = *hattrie_iter_val(it2);
free(data);
}
hattrie_iter_free(it2);
hattrie_free(trie);
}
hattrie_iter_free(it);
// Remove empty tries without data.
hattrie_free(share.ifaces);
hattrie_free(share.groups);
hattrie_free(share.remotes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment