aboutsummaryrefslogtreecommitdiffstats
path: root/epan/uat_load.l
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2018-10-05 08:33:24 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2018-10-05 12:38:32 +0000
commit75c46e80bf2e6db3d59be99e63ac0d4243c5878e (patch)
treebfd40f98eb6c17e5fc035cbedac7990f331a2fd7 /epan/uat_load.l
parent84a0eccebd02d2f9a63c96e41b110a309d26c4d7 (diff)
Qt: Add copy from another profile in UAT dialogs
Add a new button to UAT dialogs to copy entries from another profile. Change-Id: I641ba764d8738f738466529d74d4a21ff13075a0 Reviewed-on: https://code.wireshark.org/review/30028 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan/uat_load.l')
-rw-r--r--epan/uat_load.l10
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/uat_load.l b/epan/uat_load.l
index 981a362139..1aceb6a703 100644
--- a/epan/uat_load.l
+++ b/epan/uat_load.l
@@ -357,13 +357,19 @@ comment #[^\n]*\n
DIAG_ON_FLEX
gboolean
-uat_load(uat_t *uat, char **errx)
+uat_load(uat_t *uat, const gchar *filename, char **errx)
{
- gchar *fname = uat_get_actual_filename(uat, FALSE);
+ gchar *fname;
FILE *in;
yyscan_t scanner;
uat_load_scanner_state_t state;
+ if (filename) {
+ fname = g_strdup(filename);
+ } else {
+ fname = uat_get_actual_filename(uat, FALSE);
+ }
+
if (!fname) {
UAT_UPDATE(uat);