aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/file_access.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2021-09-27 13:10:43 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2021-09-30 11:07:08 +0000
commit96cfaf67a383cd3676a7dba61040e8c4b7a47b12 (patch)
treeb00b42d4e92b005aeea831d7f7ca20e8f21f54d1 /wiretap/file_access.c
parenta3c2ad04eed2c3bc0ecfffc90a2d510684a0f2d4 (diff)
Qt: Reload Lua FileHandler when having a capture file
Support reloading a Lua FileHandler when this is in use for a loaded capture file. Prompt to save the file if having unsaved changes because the file must be reloaded. Fixes #17615
Diffstat (limited to 'wiretap/file_access.c')
-rw-r--r--wiretap/file_access.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c
index 896a3317f0..93c638f5ba 100644
--- a/wiretap/file_access.c
+++ b/wiretap/file_access.c
@@ -591,6 +591,20 @@ wtap_has_open_info(const gchar *name)
return FALSE;
}
+gboolean
+wtap_uses_lua_filehandler(const wtap* wth)
+{
+ if (wth && wth->wslua_data != NULL) {
+ /*
+ * Currently, wslua_data is set if and only if using a Lua
+ * file handler.
+ */
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
/*
* Visual C++ on Win32 systems doesn't define these. (Old UNIX systems don't
* define them either.)