diff --git a/QnetLink.cpp b/QnetLink.cpp index 254cc92..409d960 100644 --- a/QnetLink.cpp +++ b/QnetLink.cpp @@ -2183,15 +2183,15 @@ void CQnetLink::ProcessREF(unsigned char *buf, const int length) } else if (length==5 && buf[0]==5 && buf[1]==0 && buf[2]==24 && buf[3]==0 && buf[4]==0) { - if (log_debug) - printf("Got a disconnect request!!\n"); - /* reply with the same DISCONNECT */ - REFWrite(buf, 5, fromDst4); - for (int i=0; i<3; i++) { if (fromDst4==to_remote_g2[i].addr && to_remote_g2[i].addr.GetPort()==rmt_ref_port) { + if (log_debug) + printf("Got a disconnect request!!\n"); + /* reply with the same DISCONNECT */ + REFWrite(buf, 5, fromDst4); + printf("Call %s disconnected\n", to_remote_g2[i].cs); to_remote_g2[i].cs[0] = '\0';