Commit Graph

13 Commits

Author SHA1 Message Date
Guy Harris cca2cde68e No main window *to* update in the early argument list parsing.
We haven't yet popped the main window up, so, when we call
capture_interface_list(), we shouldn't pass a pointer to the "update the
main window" routine.

Change-Id: Id3e02199479e66bb9e9aff99b435bd03af45a1af
Reviewed-on: https://code.wireshark.org/review/6868
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-31 04:03:58 +00:00
Guy Harris ee9d0f9230 This being C++, maybe we don't have to initialize ws_app until later.
Try going back to haveing ws_app be an automatic variable, but don't
declare it until after we've done the first-pass argument parsing.

Change-Id: Ia1f2a4819570bfadcba75d498e01dbe64991843c
Reviewed-on: https://code.wireshark.org/review/6867
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-31 02:14:05 +00:00
Guy Harris a984dbf017 Do the first-pass argument parsing before creating the WiresharkApplication.
That way, *all* the don't-need-a-GUI options can be processed without
trying to pop up a GUI, just as is the case with the GTK+ version.

Change-Id: Icbe47642eec45e887087f46c366322b8f23206cc
Reviewed-on: https://code.wireshark.org/review/6866
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-31 02:05:31 +00:00
Gerald Combs e76e14074e Qt: Fix library path reset.
g9a3676a reset the Qt library path *after* wsApp was instantiated, which
is too late. Do so before QCoreApplication has a chance to do anything
we might regret.

Change-Id: Ibbdb69d1b7c0ea4bf1042e98a5bb5deba13e954e
Reviewed-on: https://code.wireshark.org/review/6864
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-30 23:37:18 +00:00
Dario Lombardo aaa3d23280 When issued with -v wireshark-qt prints version and exits.
Change-Id: I3993c502156d534f17baa409729e2dc763910ac8
Bug: 10789
Reviewed-on: https://code.wireshark.org/review/6840
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-30 02:41:22 +00:00
Graham Bloice aad1a81b99 Fix out-of-tree build includes of config.h
If a file in the same directory as config.h, e.g. wireshark-qt.cpp
has a #include "config.h", or another header it includes also has
a #include "config.h", then an out-of-tree build, e.g. CMake will
pick up any in-tree config.h and odd things may happen.  The correct
form is #include <config.h> which will pick up the out-of-tree
version.

To find this, introduce a deliberate error and then make an out-of-tree
build, noting where it fails and fix that file.  If that file includes
other files that still cause the build to fail, set the compiler
to emit the pre-processed version so you can locate the include with
the next errant "config.h".  Repeat ad nauseum.

Possibly all includes of "config.h" should be changed to <config.h>

Revert "CMake: Clobber the top-level config.h before we build."

This reverts commit 1f3849ce61.

Ping-Bug: 10301
Change-Id: Ie567e7cc696fd48f3e730fc27032c5d2a7d8f341
Reviewed-on: https://code.wireshark.org/review/6285
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-04 00:26:13 +00:00
Guy Harris 2f34ae9e98 Remove the testing stuff.
The problem was probably that we had two competing config.h files, with
some source files including one of them and othe source files including
the other, with the nmake config.h defining HAVE_KERBEROS and
HAVE_MIT_KERBEROS and the CMake config.h defining neither, and with
wireshark-qt.cpp including the nmake config.h, so that it expected there
to be a read_keytab_file() routine, and
epan/dissectors/packet-kerberos.c including the CMake config.h, so that
it didn't define a read_keytab_file() routine.

(If the CMake build is done out-of-tree, with its config.h file outside
the source tree, and the nmake build done in-tree, with its config.h in
the top-level source directory, wireshark-qt.cpp, in the top-level
source directory, might pick up the config.h in the same directory, but
epan/dissectors/packet-kerberos.c doesn't have a config.h in its source
directory and might pick up the config.h from the CMake build
directory.)

Change-Id: I040126026c4101aca1264affc04e585fee89b87b
Reviewed-on: https://code.wireshark.org/review/6272
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-03 19:03:41 +00:00
Guy Harris 544ed8adcf Stick some #define probes in on Windows.
Let's try to figure out why, on the 64-bit Windows build,
wireshark-qt.cpp is being compiled to call read_keytab_file() but
packet-kerberos.c is not being compiled to define it.

Change-Id: I782406e2189819d9400b84b6632fe0fb62c5996d
Reviewed-on: https://code.wireshark.org/review/6261
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-03 07:42:17 +00:00
Guy Harris 16fe32f408 Temporarily #if 0 out the call to read_keytab_file().
If this fixes the Win64 build, somehow HAVE_KERBEROS is getting defined
when this is built but we're not actually building read_keytab_file in
packet-kerberos.c.

If that *doesn't* fix the Win64 build's failure to find
read_keytab_file(), something Really Weird is going on, because nobody
should be looking for it.

Change-Id: If607e0eeeff854693cf9ce2ea1009d34a20a9992
Reviewed-on: https://code.wireshark.org/review/6259
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-03 04:07:02 +00:00
Guy Harris 33ba8d384d Support -K iff HAVE_KERBEROS is defined.
This *shouldn't* make a difference, but it's a bit clearer, and, if it
*does* make a difference with some build, there's a bug in the
configuration process for that build.

Clean up indentation while we're at it.

Change-Id: I94aa6d565c3d5545620a7aeeaabce03153ec5e1c
Reviewed-on: https://code.wireshark.org/review/6257
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-03 00:27:57 +00:00
Guy Harris 5981dab95b Declare read_keytab_file() in epan/dissectors/packet-kerberos.h.
Don't throw its declaration in file.h, as it's not defined in file.c.
Instead, include it in epan/dissectors/packet-kerberos.h and include
that wherever read_keytab_file() is called.

Yes, that means you also have to include <epan/asn1.h> and, therefore,
you have to include <epan/packet.h>.  Yes, that should be cleaned up,
perhaps by splitting the Kerberos support code into "stuff that handles
encryption keys without any reference to dissection" and "stuff that
does dissection-related work".

Change-Id: Ide5c31e6d85e6011d57202f728dbc656e36138ef
Reviewed-on: https://code.wireshark.org/review/6210
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 23:05:57 +00:00
Guy Harris 6ef4cbd142 Include "file.h" to get read_keytab_file() declared.
Change-Id: I7e9ea47019f259a56a8652d0e003e23a3e1d1366
Reviewed-on: https://code.wireshark.org/review/6202
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 12:17:02 +00:00
Guy Harris 8bf7078f79 Move ui/qt/main.cpp to wireshark-qt.cpp, and get rid of the dummy.cpp hack.
Change-Id: Ib4684264363593372b3bf078cf17cae1a1cb10d6
Reviewed-on: https://code.wireshark.org/review/6199
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 10:46:00 +00:00