aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-12-11 19:09:32 -0800
committerGuy Harris <guy@alum.mit.edu>2018-12-12 03:38:55 +0000
commit541fe1d93795327e8f4b0b3b4bec58fef15f34d6 (patch)
tree63684f87d8912a2f114f4ded03cd5675fe6b1c0d /editcap.c
parentdcbd556e4da77760edf991c4394cc1821c2fbd06 (diff)
Add the VCS version number to the appname option if it's a Git build.
Change-Id: I193db5d5c7bd3668d096c72dc231ea43fa4894ec Reviewed-on: https://code.wireshark.org/review/31013 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/editcap.c b/editcap.c
index 20804b7ea4..a963822b8c 100644
--- a/editcap.c
+++ b/editcap.c
@@ -987,6 +987,7 @@ real_main(int argc, char *argv[])
{
GString *comp_info_str;
GString *runtime_info_str;
+ char *appname;
char *init_progfile_dir_error;
wtap *wth = NULL;
int i, j, read_err, write_err;
@@ -1048,13 +1049,16 @@ real_main(int argc, char *argv[])
/* Get the run-time version information string */
runtime_info_str = get_runtime_version_info(NULL);
+ /* Get the application name with version info */
+ appname = g_strdup_printf("Editcap (Wireshark) %s", get_ws_vcs_version_info());
+
/* Add it to the information to be reported on a crash. */
- ws_add_crash_info("Editcap (Wireshark) %s\n"
+ ws_add_crash_info("%s\n"
"\n"
"%s"
"\n"
"%s",
- get_ws_vcs_version_info(), comp_info_str->str, runtime_info_str->str);
+ appname, comp_info_str->str, runtime_info_str->str);
g_string_free(comp_info_str, TRUE);
g_string_free(runtime_info_str, TRUE);
@@ -1560,9 +1564,9 @@ real_main(int argc, char *argv[])
}
g_assert(filename);
- /* If we don't have an application name add Editcap */
+ /* If we don't have an application name add one */
if (wtap_block_get_string_option_value(g_array_index(params.shb_hdrs, wtap_block_t, 0), OPT_SHB_USERAPPL, &shb_user_appl) != WTAP_OPTTYPE_SUCCESS) {
- wtap_block_add_string_option_format(g_array_index(params.shb_hdrs, wtap_block_t, 0), OPT_SHB_USERAPPL, "Editcap " VERSION);
+ wtap_block_add_string_option_format(g_array_index(params.shb_hdrs, wtap_block_t, 0), OPT_SHB_USERAPPL, "%s", appname);
}
pdh = editcap_dump_open(filename, &params, &write_err);