Browse Source

[2617] log lname after establishing cc session; for debug aid

JINMEI Tatuya 12 years ago
parent
commit
ed8243603f
2 changed files with 5 additions and 0 deletions
  1. 4 0
      src/lib/cc/cc_messages.mes
  2. 1 0
      src/lib/cc/session.cc

+ 4 - 0
src/lib/cc/cc_messages.mes

@@ -60,6 +60,10 @@ and its length (2 bytes) is counted in the total length.
 There should be data representing the length of message on the socket, but it
 There should be data representing the length of message on the socket, but it
 is not there.
 is not there.
 
 
+% CC_LNAME_RECEIVED received local name: %1
+Debug message: the local module received its unique identifier (name)
+from msgq on completion of establishing the session with msgq.
+
 % CC_NO_MESSAGE no message ready to be received yet
 % CC_NO_MESSAGE no message ready to be received yet
 The program polled for incoming messages, but there was no message waiting.
 The program polled for incoming messages, but there was no message waiting.
 This is a debug message which may happen only after CC_GROUP_RECEIVE.
 This is a debug message which may happen only after CC_GROUP_RECEIVE.

+ 1 - 0
src/lib/cc/session.cc

@@ -333,6 +333,7 @@ Session::establish(const char* socket_file) {
     recvmsg(routing, msg, false);
     recvmsg(routing, msg, false);
 
 
     impl_->lname_ = msg->get("lname")->stringValue();
     impl_->lname_ = msg->get("lname")->stringValue();
+    LOG_DEBUG(logger, DBG_TRACE_DETAILED, CC_LNAME_RECEIVED).arg(impl_->lname_);
 
 
     // At this point there's no risk of resource leak.
     // At this point there's no risk of resource leak.
     session_holder.clear();
     session_holder.clear();