aboutsummaryrefslogtreecommitdiffstats
path: root/caputils/capture-pcap-util.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-03-23 21:02:47 -0700
committerGuy Harris <guy@alum.mit.edu>2019-03-24 04:48:12 +0000
commit4ad6f2a813b3775fed4a85d6a337773019357fab (patch)
tree86e810073307b94b71128f0847a3ed22fd09a8de /caputils/capture-pcap-util.c
parent2cb4d315adc291554f59b74ad04227401109db43 (diff)
Add routines to return "Please report this as a bug" message strings.
(Routines, so that if we internationalize strings not in the Qt code, this can return the appropriately translated version.) Change-Id: I1c169d79acde2f0545af7af2a737883d58f52509 Reviewed-on: https://code.wireshark.org/review/32549 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'caputils/capture-pcap-util.c')
-rw-r--r--caputils/capture-pcap-util.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/caputils/capture-pcap-util.c b/caputils/capture-pcap-util.c
index 0eedf71bf9..74f5b1ce03 100644
--- a/caputils/capture-pcap-util.c
+++ b/caputils/capture-pcap-util.c
@@ -67,6 +67,7 @@
#include "log.h"
#include <wsutil/file_util.h>
+#include <wsutil/please_report_bug.h>
#ifndef _WIN32
#include <netinet/in.h>
@@ -86,14 +87,6 @@
#endif
/*
- * Standard secondary message for unexpected errors.
- */
-static const char please_report[] =
- "Please report this to the Wireshark developers.\n"
- "https://bugs.wireshark.org/\n"
- "(This is not a crash; please do not report it as such.)";
-
-/*
* Given an interface name, find the "friendly name" and interface
* type for the interface.
*/
@@ -977,7 +970,8 @@ set_pcap_datalink(pcap_t *pcap_h, int datalink, char *name,
* tell the user to tell the Wireshark developers about it.
*/
if (strstr(set_datalink_err_str, "is not one of the DLTs supported by this device") == NULL)
- g_snprintf(secondary_errmsg, (gulong) secondary_errmsg_len, please_report);
+ g_snprintf(secondary_errmsg, (gulong) secondary_errmsg_len,
+ "%s", please_report_bug());
else
secondary_errmsg[0] = '\0';
return FALSE;