possible fix for problems observed on UB Xenial
This commit is contained in:
@@ -382,7 +382,7 @@ Connection *NetconEthernetTap::getConnection(PhySocket *sock)
|
|||||||
|
|
||||||
void NetconEthernetTap::closeConnection(PhySocket *sock)
|
void NetconEthernetTap::closeConnection(PhySocket *sock)
|
||||||
{
|
{
|
||||||
dwr(MSG_DEBUG, "closeConnection(%x):\n", sock);
|
dwr(MSG_DEBUG, "closeConnection(sock=%x):\n", sock);
|
||||||
Mutex::Lock _l(_close_m);
|
Mutex::Lock _l(_close_m);
|
||||||
// Here we assume _tcpconns_m is already locked by caller
|
// Here we assume _tcpconns_m is already locked by caller
|
||||||
if(!sock) {
|
if(!sock) {
|
||||||
@@ -394,7 +394,6 @@ void NetconEthernetTap::closeConnection(PhySocket *sock)
|
|||||||
return;
|
return;
|
||||||
if(conn->type==SOCK_DGRAM) {
|
if(conn->type==SOCK_DGRAM) {
|
||||||
lwipstack->__udp_remove(conn->UDP_pcb);
|
lwipstack->__udp_remove(conn->UDP_pcb);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if(conn->TCP_pcb && conn->TCP_pcb->state != CLOSED) {
|
if(conn->TCP_pcb && conn->TCP_pcb->state != CLOSED) {
|
||||||
dwr(MSG_DEBUG,"closeConnection(conn=%p,sock=%p): PCB->state = %d\n",
|
dwr(MSG_DEBUG,"closeConnection(conn=%p,sock=%p): PCB->state = %d\n",
|
||||||
@@ -417,7 +416,6 @@ void NetconEthernetTap::closeConnection(PhySocket *sock)
|
|||||||
dwr(MSG_ERROR,"closeConnection(sock=%p): error while calling tcp_close()\n", (void*)&sock);
|
dwr(MSG_ERROR,"closeConnection(sock=%p): error while calling tcp_close()\n", (void*)&sock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dwr(MSG_DEBUG, "Removing from _Connections\n");
|
|
||||||
for(size_t i=0;i<_Connections.size();++i) {
|
for(size_t i=0;i<_Connections.size();++i) {
|
||||||
if(_Connections[i] == conn){
|
if(_Connections[i] == conn){
|
||||||
_Connections.erase(_Connections.begin() + i);
|
_Connections.erase(_Connections.begin() + i);
|
||||||
@@ -427,7 +425,6 @@ void NetconEthernetTap::closeConnection(PhySocket *sock)
|
|||||||
}
|
}
|
||||||
if(!sock)
|
if(!sock)
|
||||||
return;
|
return;
|
||||||
dwr(MSG_DEBUG, "closing underlying socket\n");
|
|
||||||
close(_phy.getDescriptor(sock));
|
close(_phy.getDescriptor(sock));
|
||||||
_phy.close(sock, false);
|
_phy.close(sock, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,6 @@ int load_symbols_rpc()
|
|||||||
|
|
||||||
int rpc_join(char * sockname)
|
int rpc_join(char * sockname)
|
||||||
{
|
{
|
||||||
LOGV("RPC = %s\n", sockname);
|
|
||||||
if(sockname == NULL) {
|
if(sockname == NULL) {
|
||||||
printf("Warning, rpc netpath is NULL\n");
|
printf("Warning, rpc netpath is NULL\n");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user