forked from osmocom/wireshark
Revert "Apparently, WS_WIKI_URL() is unworkable not only in C++ but in C."
This reverts commit 5df2925434
.
The problem only showed up in tfshark.c, and was caused by tfshark.c
using stuff from ui/urls.h but not *including* ui/urls.h.
This commit is contained in:
parent
a8d023ba58
commit
f7c99f73e2
4
file.c
4
file.c
|
@ -635,7 +635,7 @@ cf_read(capture_file *cf, gboolean reloading)
|
|||
CATCH(OutOfMemoryError) {
|
||||
simple_message_box(ESD_TYPE_ERROR, NULL,
|
||||
"More information and workarounds can be found at\n"
|
||||
WS_WIKI_HOME_URL "/" "KnownBugs/OutOfMemory",
|
||||
WS_WIKI_URL("KnownBugs/OutOfMemory"),
|
||||
"Sorry, but Wireshark has run out of memory and has to terminate now.");
|
||||
#if 0
|
||||
/* Could we close the current capture and free up memory from that? */
|
||||
|
@ -813,7 +813,7 @@ cf_continue_tail(capture_file *cf, volatile int to_read, wtap_rec *rec,
|
|||
CATCH(OutOfMemoryError) {
|
||||
simple_message_box(ESD_TYPE_ERROR, NULL,
|
||||
"More information and workarounds can be found at\n"
|
||||
WS_WIKI_HOME_URL "/" "KnownBugs/OutOfMemory",
|
||||
WS_WIKI_URL("KnownBugs/OutOfMemory"),
|
||||
"Sorry, but Wireshark has run out of memory and has to terminate now.");
|
||||
#if 0
|
||||
/* Could we close the current capture and free up memory from that? */
|
||||
|
|
|
@ -954,7 +954,7 @@ main(int argc, char *argv[])
|
|||
"Sorry, but TFShark has to terminate now.\n"
|
||||
"\n"
|
||||
"Some infos / workarounds can be found at:\n"
|
||||
WS_WIKI_HOME_URL "/" "KnownBugs/OutOfMemory" "\n");
|
||||
WS_WIKI_URL("KnownBugs/OutOfMemory") "\n");
|
||||
success = FALSE;
|
||||
}
|
||||
ENDTRY;
|
||||
|
|
4
tshark.c
4
tshark.c
|
@ -2069,7 +2069,7 @@ main(int argc, char *argv[])
|
|||
"Sorry, but TShark has to terminate now.\n"
|
||||
"\n"
|
||||
"More information and workarounds can be found at\n"
|
||||
WS_WIKI_HOME_URL "/" "KnownBugs/OutOfMemory" "\n");
|
||||
WS_WIKI_URL("KnownBugs/OutOfMemory") "\n");
|
||||
status = PROCESS_FILE_ERROR;
|
||||
}
|
||||
ENDTRY;
|
||||
|
@ -2577,7 +2577,7 @@ capture(void)
|
|||
"Sorry, but TShark has to terminate now.\n"
|
||||
"\n"
|
||||
"More information and workarounds can be found at\n"
|
||||
WS_WIKI_HOME_URL "/" "KnownBugs/OutOfMemory" "\n");
|
||||
WS_WIKI_URL("KnownBugs/OutOfMemory") "\n");
|
||||
abort();
|
||||
}
|
||||
ENDTRY;
|
||||
|
|
|
@ -269,7 +269,7 @@ capture_input_read_all(capture_session *cap_session, gboolean is_tempfile,
|
|||
"\n"
|
||||
"Help about capturing can be found at\n"
|
||||
"\n"
|
||||
" " WS_WIKI_HOME_URL "/" "CaptureSetup"
|
||||
" " WS_WIKI_URL("CaptureSetup")
|
||||
#ifdef _WIN32
|
||||
"\n\n"
|
||||
"Wireless (Wi-Fi/WLAN):\n"
|
||||
|
@ -746,7 +746,7 @@ capture_input_closed(capture_session *cap_session, gchar *msg)
|
|||
"\n"
|
||||
"Help about capturing can be found at\n"
|
||||
"\n"
|
||||
" " WS_WIKI_HOME_URL "/" "CaptureSetup"
|
||||
" " WS_WIKI_URL("CaptureSetup")
|
||||
#ifdef _WIN32
|
||||
"\n\n"
|
||||
"Wireless (Wi-Fi/WLAN):\n"
|
||||
|
|
|
@ -102,22 +102,22 @@ topic_action_url(topic_action_e action)
|
|||
url = g_strdup(WS_Q_AND_A_URL);
|
||||
break;
|
||||
case(ONLINEPAGE_SAMPLE_FILES):
|
||||
url = g_strdup(WS_WIKI_HOME_URL "/" "SampleCaptures");
|
||||
url = g_strdup(WS_WIKI_URL("SampleCaptures"));
|
||||
break;
|
||||
case(ONLINEPAGE_CAPTURE_SETUP):
|
||||
url = g_strdup(WS_WIKI_HOME_URL "/" "CaptureSetup");
|
||||
url = g_strdup(WS_WIKI_URL("CaptureSetup"));
|
||||
break;
|
||||
case(ONLINEPAGE_NETWORK_MEDIA):
|
||||
url = g_strdup(WS_WIKI_HOME_URL "/" "CaptureSetup/NetworkMedia");
|
||||
url = g_strdup(WS_WIKI_URL("CaptureSetup/NetworkMedia"));
|
||||
break;
|
||||
case(ONLINEPAGE_SAMPLE_CAPTURES):
|
||||
url = g_strdup(WS_WIKI_HOME_URL "/" "SampleCaptures");
|
||||
url = g_strdup(WS_WIKI_URL("SampleCaptures"));
|
||||
break;
|
||||
case(ONLINEPAGE_SECURITY):
|
||||
url = g_strdup(WS_WIKI_HOME_URL "/" "Security");
|
||||
url = g_strdup(WS_WIKI_URL("Security"));
|
||||
break;
|
||||
case(ONLINEPAGE_CHIMNEY):
|
||||
url = g_strdup(WS_WIKI_HOME_URL "/" "CaptureSetup/Offloading#chimney");
|
||||
url = g_strdup(WS_WIKI_URL("CaptureSetup/Offloading#chimney"));
|
||||
break;
|
||||
|
||||
/* local manual pages */
|
||||
|
|
|
@ -334,12 +334,11 @@ check_and_warn_user_startup()
|
|||
cur_user = get_cur_username();
|
||||
cur_group = get_cur_groupname();
|
||||
simple_message_box(ESD_TYPE_WARN, &recent.privs_warn_if_elevated,
|
||||
"Running as user \"%s\" and group \"%s\".\n"
|
||||
"This could be dangerous.\n\n"
|
||||
"If you're running Wireshark this way in order to perform live capture, "
|
||||
"you may want to be aware that there is a better way documented at\n"
|
||||
WS_WIKI_HOME_URL "/" "CaptureSetup/CapturePrivileges",
|
||||
cur_user, cur_group);
|
||||
"Running as user \"%s\" and group \"%s\".\n"
|
||||
"This could be dangerous.\n\n"
|
||||
"If you're running Wireshark this way in order to perform live capture, "
|
||||
"you may want to be aware that there is a better way documented at\n"
|
||||
WS_WIKI_URL("CaptureSetup/CapturePrivileges"), cur_user, cur_group);
|
||||
g_free(cur_user);
|
||||
g_free(cur_group);
|
||||
}
|
||||
|
|
|
@ -16,3 +16,8 @@
|
|||
#define WS_FAQ_URL "https://www.wireshark.org/faq.html"
|
||||
#define WS_Q_AND_A_URL "https://ask.wireshark.org"
|
||||
#define WS_WIKI_HOME_URL "https://gitlab.com/wireshark/wireshark/-/wikis"
|
||||
|
||||
/*
|
||||
* Construct a wiki URL given the path to the wiki page.
|
||||
*/
|
||||
#define WS_WIKI_URL(path) WS_WIKI_HOME_URL "/" path
|
||||
|
|
Loading…
Reference in New Issue