From f52181a7ce8750d44d7c76cf0d9952d756614511 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 30 Jan 2024 09:48:27 +0600 Subject: [PATCH 1/2] Parameters remove --- source/libublsettings.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/source/libublsettings.h b/source/libublsettings.h index 0b1dbfb..07f428f 100644 --- a/source/libublsettings.h +++ b/source/libublsettings.h @@ -16,16 +16,6 @@ #define DesktopPath "/usr/share/applications/" -// #define config_parameters { {"config","VERSION","CMDLNE","SERVICESSTART","SERVICENOSTART","SERVICEMASK","HOSTNAME","MACHINEID",\ -// "APPARMOR","PARTITIONSNOMOUNT","PARTITIONSAUTOMOUNT","AUTOMOUNT_SHARE","PUBLICDIR","AUTOMOUNTSERVER",\ -// "PARTITIONSHARE","PRINTERADD","RUNLDCONFIG","DEPMOD","UPDATEHOME","TMPFS","VARTMPFS","PULSEAUDIO",\ -// "ALSACARD","ALSADEVICE","UBLINUXUPDATE","MKSQFS_OPTS","MKSQFS_FASTALG"},\ -// {"users","DEFAULTPASSWD","DEFAULTROOTPASSWD","HASHPASSWD","USERADD","GROUPADD","USERGROPS","ADDADM","USERSHADOW","DEFAULTUSER","HOSTNAME","MACHINEID"},\ -// {"system","ENVIRONMENT","AUTHPAM"},\ -// {"logging","AUDITD","JOURNALD","LOGROTATE"},\ -// {"boot"}\ -// } - /**for_dictionaries(element, stack) * [EN] From fbc7d9bef062be8e4c3ab3e1343484fc141f3bd3 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 30 Jan 2024 09:48:39 +0600 Subject: [PATCH 2/2] Saving crash fix --- source/libublsettings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libublsettings.c b/source/libublsettings.c index 14da1c8..4f58841 100644 --- a/source/libublsettings.c +++ b/source/libublsettings.c @@ -1311,14 +1311,14 @@ int yon_config_save_registered(char *path){ for_dictionaries(dct,sections_add){ char *command = yon_dictionary_get_data(dct,char*); yon_launch(command); - yon_dictionary_free_all(sections_add,free); } + yon_dictionary_free_all(sections_add,free); if (sections_remove) for_dictionaries(dct,sections_remove){ char *command = yon_dictionary_get_data(dct,char*); yon_launch(command); - yon_dictionary_free_all(sections_remove,free); } + yon_dictionary_free_all(sections_remove,free); if (sections_add||sections_remove) return 1; else return 0;