aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2006-10-20 06:24:56 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2006-10-20 06:24:56 +0000
commit22a949a42fdf4cb21b87ab871317d8a0348f92d1 (patch)
tree1182fb536976a73a3ec2a21f6685fcd168dcae7e /dumpcap.c
parentdd63bac75b21380b5fca1758c44dd50fc8b91673 (diff)
Make dumpcap complile again and other minor improvements.
svn path=/trunk/; revision=19624
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 410353618c..63a52ce0c6 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -193,13 +193,17 @@ cmdarg_err_cont(const char *fmt, ...)
BOOL WINAPI ConsoleCtrlHandlerRoutine(DWORD dwCtrlType)
{
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_INFO,
- "Console: Ctrl+C");
+ "Console: Control signal");
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG,
- "Console: Ctrl+C CtrlType: %u", dwCtrlType);
+ "Console: Control signal, CtrlType: %u", dwCtrlType);
- capture_loop_stop();
-
- return TRUE;
+ /* Keep capture running if we're a service and a user logs off */
+ if (capture_child || (dwCtrlType != CTRL_LOGOFF_EVENT)) {
+ capture_loop_stop();
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
#endif
@@ -274,7 +278,7 @@ main(int argc, char *argv[])
/* Assemble the run-time version information string */
runtime_info_str = g_string_new("Running ");
- get_runtime_version_info(runtime_info_str);
+ get_runtime_version_info(runtime_info_str, NULL);
/* the default_log_handler will use stdout, which makes trouble in */
/* capture child mode, as it uses stdout for it's sync_pipe */