BlinkenArea commited on 2011-12-28 01:17:58
Showing 1 changed files, with 5 additions and 2 deletions.
... | ... |
@@ -368,8 +368,11 @@ void Phone<ADDR, SOCK>::receiveFromSock() |
368 | 368 |
if (!m_pSock->recv(msg, addr)) |
369 | 369 |
return; |
370 | 370 |
|
371 |
- // check that packet came from server address |
|
372 |
- if (!m_fileServer.m_valid || addr != m_fileServer.m_obj) |
|
371 |
+ // check that packet came from server address (but ignore port) |
|
372 |
+ if (!m_fileServer.m_valid) |
|
373 |
+ return; // no server configured |
|
374 |
+ addr.setPort(m_fileServer.m_obj.getPort()); |
|
375 |
+ if (addr != m_fileServer.m_obj) |
|
373 | 376 |
return; // mismatch |
374 | 377 |
|
375 | 378 |
// reset server timeout |
376 | 379 |