register message contains port number
Stefan Schuermans

Stefan Schuermans commited on 2011-12-27 21:01:58
Showing 1 changed files, with 6 additions and 1 deletions.

... ...
@@ -249,7 +249,12 @@ void Phone<ADDR, SOCK>::destroySock()
249 249
 template<typename ADDR, typename SOCK>
250 250
 void Phone<ADDR, SOCK>::sendRegister()
251 251
 {
252
-  sendNow(0, "register");
252
+  ADDR addr;
253
+  if (m_pSock)
254
+    m_pSock->getAddr(addr);
255
+  std::stringstream strm;
256
+  strm << "register:" << addr.getPort();
257
+  sendNow(0, strm.str());
253 258
 
254 259
   // set time for next register message and next heartbeat
255 260
   m_timeRegister = Time::now() + m_serverTimeout;
256 261