aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-02-29 16:51:32 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-02-29 16:51:32 +0000
commitd24fad6371fb15e9b02f9a0bb27251e4102a8956 (patch)
tree05d6336b30c63b0f1c00751ffb06968bea8e16b5 /file.c
parent094e8f8947730632710030b5bde07d1a10801e7c (diff)
- Add a LED in the statusbar to indicate that capture comments exists,
clickable to open an edit window. - Add checks for NULL pointers. Help with a different color LED possibly with Jeff's (c) in it apreceated. Should the LED be placed elsewhere or the whole thing done differently? svn path=/trunk/; revision=41242
Diffstat (limited to 'file.c')
-rw-r--r--file.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/file.c b/file.c
index 171bacec81..c6d06a6eae 100644
--- a/file.c
+++ b/file.c
@@ -3650,6 +3650,37 @@ cf_unignore_frame(capture_file *cf, frame_data *frame)
}
}
+/*
+ * Read the comment in SHB block
+ */
+
+const gchar*
+cf_read_shb_comment(capture_file *cf)
+{
+ wtapng_section_t* shb_inf;
+ const gchar *temp_str;
+
+
+ /* Get info from SHB */
+ shb_inf = wtap_file_get_shb_info(cf->wth);
+ if(shb_inf == NULL)
+ return NULL;
+ temp_str = shb_inf->opt_comment;
+ g_free(shb_inf);
+
+ return temp_str;
+
+}
+
+void
+cf_update_capture_comment(capture_file *cf, gchar *comment)
+{
+
+ /* Get info from SHB */
+ wtap_write_shb_comment(cf->wth, comment);
+
+}
+
typedef struct {
wtap_dumper *pdh;
const char *fname;