File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1644,6 +1644,9 @@ static void add_config(struct lightningd *ld,
1644
1644
} else if (opt -> type & OPT_HASARG ) {
1645
1645
if (opt -> desc == opt_hidden ) {
1646
1646
/* Ignore hidden options (deprecated) */
1647
+ } else if (opt -> show == (void * )opt_show_charp ) {
1648
+ /* Don't truncate! */
1649
+ answer = tal_strdup (tmpctx , * (char * * )opt -> u .carg );
1647
1650
} else if (opt -> show ) {
1648
1651
opt -> show (buf , opt -> u .carg );
1649
1652
strcpy (buf + OPT_SHOW_LEN - 1 , "..." );
@@ -1655,14 +1658,7 @@ static void add_config(struct lightningd *ld,
1655
1658
json_add_primitive (response , name0 , buf );
1656
1659
return ;
1657
1660
}
1658
-
1659
- /* opt_show_charp surrounds with "", strip them */
1660
- if (strstarts (buf , "\"" )) {
1661
- char * end = strrchr (buf , '"' );
1662
- memmove (end , end + 1 , strlen (end ));
1663
- answer = buf + 1 ;
1664
- } else
1665
- answer = buf ;
1661
+ answer = buf ;
1666
1662
} else if (opt -> cb_arg == (void * )opt_set_talstr
1667
1663
|| opt -> cb_arg == (void * )opt_set_charp
1668
1664
|| is_restricted_print_if_nonnull (opt -> cb_arg )) {
You can’t perform that action at this time.
0 commit comments