forked from osmocom/wireshark
sharkd: Prefer version_info.h instead of version.h
parent
3a3fda2ca4
commit
47d2afd990
11
sharkd.c
11
sharkd.c
|
@ -780,17 +780,6 @@ sharkd_set_user_comment(frame_data *fd, const gchar *new_comment)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#include "version.h"
|
||||
const char *sharkd_version(void)
|
||||
{
|
||||
/* based on get_ws_vcs_version_info(), but shorter */
|
||||
#ifdef VCSVERSION
|
||||
return VCSVERSION;
|
||||
#else
|
||||
return VERSION;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
|
|
1
sharkd.h
1
sharkd.h
|
@ -37,7 +37,6 @@ int sharkd_dissect_columns(frame_data *fdata, guint32 frame_ref_num, guint32 pre
|
|||
int sharkd_dissect_request(guint32 framenum, guint32 frame_ref_num, guint32 prev_dis_num, sharkd_dissect_func_t cb, guint32 dissect_flags, void *data);
|
||||
const char *sharkd_get_user_comment(const frame_data *fd);
|
||||
int sharkd_set_user_comment(frame_data *fd, const gchar *new_comment);
|
||||
const char *sharkd_version(void);
|
||||
|
||||
/* sharkd_daemon.c */
|
||||
int sharkd_init(int argc, char **argv);
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include <ui/rtp_stream.h>
|
||||
#include <ui/tap-rtp-common.h>
|
||||
#include <ui/tap-rtp-analysis.h>
|
||||
#include <version_info.h>
|
||||
#include <epan/to_str.h>
|
||||
|
||||
#include <epan/addr_resolv.h>
|
||||
|
@ -987,7 +988,7 @@ sharkd_session_process_info(void)
|
|||
sharkd_json_value_string(NULL, ftype_name((ftenum_t) i));
|
||||
sharkd_json_array_close();
|
||||
|
||||
sharkd_json_value_string("version", sharkd_version());
|
||||
sharkd_json_value_string("version", get_ws_vcs_version_info_short());
|
||||
|
||||
sharkd_json_array_open("nstat");
|
||||
i = 0;
|
||||
|
|
|
@ -491,6 +491,16 @@ get_ws_vcs_version_info(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
const char *
|
||||
get_ws_vcs_version_info_short(void)
|
||||
{
|
||||
#ifdef VCSVERSION
|
||||
return VCSVERSION;
|
||||
#else
|
||||
return VERSION;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
get_ws_version_number(int *major, int *minor, int *micro)
|
||||
{
|
||||
|
|
|
@ -87,6 +87,11 @@ GString *get_runtime_version_info(void (*additional_info)(GString *));
|
|||
*/
|
||||
const char *get_ws_vcs_version_info(void);
|
||||
|
||||
/*
|
||||
* Shorter version of get_ws_vcs_version_info().
|
||||
*/
|
||||
const char *get_ws_vcs_version_info_short(void);
|
||||
|
||||
/*
|
||||
* Return version number as integers.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue