diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2013-08-29 07:49:53 +0000 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2013-08-29 07:49:53 +0000 |
commit | 3342b80ab8fce9b3d851c19528c3137459930cc7 (patch) | |
tree | d057dbf6fd95b0c4858d7e33179a9a91a2bbe294 /test/thread | |
parent | 5ce717503afcc4962ed929057616b43e0cf39449 (diff) | |
download | mongo-3342b80ab8fce9b3d851c19528c3137459930cc7.tar.gz |
Add a WT_SESSION handle to WT_EVENT_HANDLER callbacks.
Specifically added to handle_error, handle_message and handle_progress.
This change allows applications to match events to session handles.
Diffstat (limited to 'test/thread')
-rw-r--r-- | test/thread/t.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/thread/t.c b/test/thread/t.c index 104ca445243..35c9c97534a 100644 --- a/test/thread/t.c +++ b/test/thread/t.c @@ -36,8 +36,8 @@ int session_per_op; /* New session per operation */ static char *progname; /* Program name */ static FILE *logfp; /* Log file */ -static int handle_error(WT_EVENT_HANDLER *, int, const char *); -static int handle_message(WT_EVENT_HANDLER *, const char *); +static int handle_error(WT_EVENT_HANDLER *, WT_SESSION *, int, const char *); +static int handle_message(WT_EVENT_HANDLER *, WT_SESSION *, const char *); static void onint(int); static void shutdown(void); static int usage(void); @@ -207,18 +207,22 @@ shutdown(void) } static int -handle_error(WT_EVENT_HANDLER *handler, int error, const char *errmsg) +handle_error(WT_EVENT_HANDLER *handler, + WT_SESSION *session, int error, const char *errmsg) { UNUSED(handler); + UNUSED(session); UNUSED(error); return (fprintf(stderr, "%s\n", errmsg) < 0 ? -1 : 0); } static int -handle_message(WT_EVENT_HANDLER *handler, const char *message) +handle_message(WT_EVENT_HANDLER *handler, + WT_SESSION *session, const char *message) { UNUSED(handler); + UNUSED(session); if (logfp != NULL) return (fprintf(logfp, "%s\n", message) < 0 ? -1 : 0); |