diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-04-23 20:01:51 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-04-23 20:01:51 -0400 |
commit | d1a3c3de66086f2237207b7d610c328a53f36a61 (patch) | |
tree | ee20ee8c452f4f2002636156f2426e50f7a26809 /src/config/config_api.c | |
parent | 437bf6034d0704143c19ebbad7d870bd3a57d172 (diff) | |
download | mongo-d1a3c3de66086f2237207b7d610c328a53f36a61.tar.gz |
Return EINVAL if both a session and error handler specified to
wiredtiger_config_validate.
Diffstat (limited to 'src/config/config_api.c')
-rw-r--r-- | src/config/config_api.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config/config_api.c b/src/config/config_api.c index a933e4a3952..deff33a10bd 100644 --- a/src/config/config_api.c +++ b/src/config/config_api.c @@ -118,6 +118,14 @@ wiredtiger_config_validate(WT_SESSION *wt_session, session = (WT_SESSION_IMPL *)wt_session; + /* + * It's a logic error to specify both a session and an event handler. + */ + if (session != NULL && handler != NULL) + WT_RET_MSG(session, EINVAL, + "wiredtiger_config_validate error handler ignored when " + "a session also specified"); + /* * If we're not given a session, but we do have an event handler, build * a fake session/connection pair and configure the event handler. |