Skip to content

Commit

Permalink
epan: Remove dependency on version_info object library
Browse files Browse the repository at this point in the history
Dependending on version_info is unnecessary and forces an epan
rebuild every time the git commit id changes, which can be slow,
especially with LTO enabled, and again is unnecessary.

Printing the VCS version to the TLS debug log is a minor convenience
that doesn't justify the cost to relink epan with every commit.
  • Loading branch information
randstr authored and Wireshark GitLab Utility committed Jul 4, 2021
1 parent aa5df68 commit 3a3fda2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion epan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ add_library(epan
$<TARGET_OBJECTS:dissectors>
$<TARGET_OBJECTS:dissectors-corba>
$<TARGET_OBJECTS:ftypes>
$<TARGET_OBJECTS:version_info>
$<TARGET_OBJECTS:wmem>
$<$<BOOL:${LUA_FOUND}>:$<TARGET_OBJECTS:wslua>>
${CMAKE_BINARY_DIR}/image/libwireshark.rc
Expand Down
2 changes: 0 additions & 2 deletions epan/dissectors/packet-tls-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <wsutil/wsgcrypt.h>
#include <wsutil/rsa.h>
#include <wsutil/ws_assert.h>
#include <version_info.h>
#include "packet-ber.h"
#include "packet-x509af.h"
#include "packet-x509if.h"
Expand Down Expand Up @@ -6191,7 +6190,6 @@ ssl_set_debug(const gchar* name)
debug_file_must_be_closed = 0;

ssl_debug_printf("Wireshark SSL debug log \n\n");
ssl_debug_printf("Wireshark version: %s\n", get_ws_vcs_version_info());
#ifdef HAVE_LIBGNUTLS
ssl_debug_printf("GnuTLS version: %s\n", gnutls_check_version(NULL));
#endif
Expand Down
8 changes: 6 additions & 2 deletions epan/epan.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include <glib.h>

#include <version_info.h>
#include <wsutil/report_message.h>

#include <epan/exceptions.h>
Expand Down Expand Up @@ -128,7 +127,12 @@ epan_get_version(void) {
void
epan_get_version_number(int *major, int *minor, int *micro)
{
get_ws_version_number(major, minor, micro);
if (major)
*major = VERSION_MAJOR;
if (minor)
*minor = VERSION_MINOR;
if (micro)
*micro = VERSION_MICRO;
}

#if defined(_WIN32)
Expand Down
1 change: 0 additions & 1 deletion epan/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <epan/charsets.h>
#include <wsutil/json_dumper.h>
#include <wsutil/filesystem.h>
#include <version_info.h>
#include <wsutil/utf8_entities.h>
#include <wsutil/ws_assert.h>
#include <ftypes/ftypes-int.h>
Expand Down

0 comments on commit 3a3fda2

Please sign in to comment.