diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-12-11 19:09:32 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-12-12 03:38:55 +0000 |
commit | 541fe1d93795327e8f4b0b3b4bec58fef15f34d6 (patch) | |
tree | 63684f87d8912a2f114f4ded03cd5675fe6b1c0d /editcap.c | |
parent | dcbd556e4da77760edf991c4394cc1821c2fbd06 (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.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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, ¶ms, &write_err); |