Skip to content

Commit

Permalink
add a short comment to cant_load_winpcap_err() and use it in gtk/capt…
Browse files Browse the repository at this point in the history
…ure_dlg.c

svn path=/trunk/; revision=16693
  • Loading branch information
ulflulfl committed Dec 6, 2005
1 parent 55c9157 commit 47ae9fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
2 changes: 2 additions & 0 deletions capture_errs.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#ifdef HAVE_LIBPCAP

#ifdef _WIN32
/* error message, if WinPcap couldn't be loaded */
/* will use g_strdup, don't forget to g_free the returned string! */
extern char *cant_load_winpcap_err(const char *app_name);
#endif /* _WIN32 */

Expand Down
20 changes: 4 additions & 16 deletions gtk/capture_dlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1236,23 +1236,11 @@ capture_start_cb(GtkWidget *w _U_, gpointer d _U_)
#ifdef _WIN32
/* Is WPcap loaded? */
if (!has_wpcap) {
char * err_msg = cant_load_winpcap_err("Ethereal");

simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Unable to load WinPcap (wpcap.dll); Ethereal will not be able\n"
"to capture packets.\n\n"
"In order to capture packets, WinPcap must be installed; see\n"
"\n"
" http://www.winpcap.org/\n"
"\n"
"or the mirror at\n"
"\n"
" http://winpcap.mirror.ethereal.com/\n"
"\n"
"or the mirror at\n"
"\n"
" http://www.mirrors.wiretapped.net/security/packet-capture/winpcap/\n"
"\n"
"for a downloadable version of WinPcap and for instructions\n"
"on how to install WinPcap.");
err_msg);
g_free(err_msg);
return;
}
#endif
Expand Down

0 comments on commit 47ae9fa

Please sign in to comment.