diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-02-29 16:51:32 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-02-29 16:51:32 +0000 |
commit | d24fad6371fb15e9b02f9a0bb27251e4102a8956 (patch) | |
tree | 05d6336b30c63b0f1c00751ffb06968bea8e16b5 /file.c | |
parent | 094e8f8947730632710030b5bde07d1a10801e7c (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.c | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -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; |