Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3468)

Unified Diff: remoting/host/host_event_logger.cc

Issue 9288040: Log client IP addresses to syslog in Me2Me host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Log full JID instead of just the username Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/host_event_logger.h ('k') | remoting/host/host_status_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_event_logger.cc
diff --git a/remoting/host/host_event_logger.cc b/remoting/host/host_event_logger.cc
index ca8e49a36094e9b6addf5cc7293b6cf9edb159ed..d559f5d5d249b6280ebeaa33b2c4fd53c6f17184 100644
--- a/remoting/host/host_event_logger.cc
+++ b/remoting/host/host_event_logger.cc
@@ -12,6 +12,7 @@
#undef LOG_WARNING
#endif // defined(OS_LINUX)
+#include "net/base/ip_endpoint.h"
#include "remoting/host/chromoting_host.h"
#include "remoting/host/system_event_logger.h"
@@ -43,19 +44,24 @@ HostEventLogger::~HostEventLogger() {
}
void HostEventLogger::OnClientAuthenticated(const std::string& jid) {
- std::string username = jid.substr(0, jid.find('/'));
- Log("Client connected: " + username);
+ Log("Client connected: " + jid);
}
void HostEventLogger::OnClientDisconnected(const std::string& jid) {
- std::string username = jid.substr(0, jid.find('/'));
- Log("Client disconnected: " + username);
+ Log("Client disconnected: " + jid);
}
void HostEventLogger::OnAccessDenied(const std::string& jid) {
Log("Access denied for client: " + jid);
}
+void HostEventLogger::OnClientIpAddress(const std::string& jid,
+ const std::string& channel_name,
+ const net::IPEndPoint& end_point) {
+ Log("Channel IP for client: " + jid + " ip='" + end_point.ToString() +
+ "' channel='" + channel_name + "'");
+}
+
void HostEventLogger::OnShutdown() {
}
« no previous file with comments | « remoting/host/host_event_logger.h ('k') | remoting/host/host_status_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698