From 2fdcea54f538163a08aaa8f92d01a31f6f8a9f53 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 26 Jan 2013 18:55:55 -0800 Subject: [PATCH] fix logging of sockets --- xwords4/relay/cref.cpp | 2 +- xwords4/relay/tpool.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/relay/cref.cpp b/xwords4/relay/cref.cpp index c956094aa..bf61d8a70 100644 --- a/xwords4/relay/cref.cpp +++ b/xwords4/relay/cref.cpp @@ -373,7 +373,7 @@ CookieRef::AlreadyHere( HostID hid, unsigned short seed, const AddrInfo* addr, bool* spotTaken ) { logf( XW_LOGINFO, "%s(hid=%d,seed=%x(%d),socket=%d)", __func__, - hid, seed, seed, socket ); + hid, seed, seed, addr->socket() ); bool here = false; RWWriteLock rwl( &m_socketsRWLock ); diff --git a/xwords4/relay/tpool.cpp b/xwords4/relay/tpool.cpp index 36c5857f6..8d0cc1d79 100644 --- a/xwords4/relay/tpool.cpp +++ b/xwords4/relay/tpool.cpp @@ -173,7 +173,7 @@ XWThreadPool::CloseSocket( const AddrInfo* addr ) ++iter; } } - logf( XW_LOGINFO, "CLOSING socket %d", socket ); + logf( XW_LOGINFO, "CLOSING socket %d", addr->socket() ); close( addr->socket() ); /* if ( do_interrupt ) { */ /* We always need to interrupt the poll because the socket we're closing @@ -187,7 +187,7 @@ XWThreadPool::CloseSocket( const AddrInfo* addr ) void XWThreadPool::EnqueueKill( const AddrInfo* addr, const char* const why ) { - logf( XW_LOGINFO, "%s(%d) reason: %s", __func__, socket, why ); + logf( XW_LOGINFO, "%s(%d) reason: %s", __func__, addr->socket(), why ); if ( addr->isTCP() ) { SockInfo si; si.m_type = STYPE_UNKNOWN;