Skip to content

Commit

Permalink
refs #10226: In Session Audit / Connection History, do not propose to…
Browse files Browse the repository at this point in the history
… display a session with a failed status.
  • Loading branch information
XiaopengZHOU committed Jul 28, 2016
1 parent 1adffc0 commit 424d0f6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mod/rdp/rdp.hpp
Expand Up @@ -3719,7 +3719,12 @@ class mod_rdp : public mod_api
{
char message[128];
snprintf(message, sizeof(message), "Code=%d", e.id);
this->acl->report("SESSION_EXCEPTION", message);

char const* reason =
((UP_AND_RUNNING == this->connection_finalization_state) ?
"SESSION_EXCEPTION" : "SESSION_EXCEPTION_NO_RECORD");

this->acl->report(reason, message);

this->end_session_reason.clear();
this->end_session_message.clear();
Expand Down
10 changes: 10 additions & 0 deletions tools/sesman/sesmanworker/sesman.py
Expand Up @@ -1531,6 +1531,16 @@ def connect_to_target(self, selected_target):
update_args["target_account"] = redir_login
self.engine.update_session(physical_target,
**update_args)
elif _reporting_reason == u'SESSION_EXCEPTION':
Logger().info(u"RDP connection terminated. Reason: Session exception")
release_reason = u'Session exception: ' + _reporting_message
self.engine.set_session_status(
diag=release_reason)
elif _reporting_reason == u'SESSION_EXCEPTION_NO_RECORD':
Logger().info(u"RDP connection terminated. Reason: Session exception (no record)")
release_reason = u'Session exception: ' + _reporting_message
self.engine.set_session_status(
result=False, diag=release_reason)
elif _reporting_reason == u'SESSION_PROBE_KEEPALIVE_MISSED':
Logger().info(u'RDP connection terminated. Reason: Session Probe Keepalive missed')
release_reason = u'Session Probe Keepalive missed'
Expand Down

0 comments on commit 424d0f6

Please sign in to comment.