|
|
@ -151,7 +151,8 @@ EthernetHandleSet_removeSocket(EthernetHandleSet self, const EthernetSocket sock
|
|
|
|
if ((self != NULL) && (sock != NULL)) {
|
|
|
|
if ((self != NULL) && (sock != NULL)) {
|
|
|
|
HANDLE h = pcap_getevent(socket->rawSocket);
|
|
|
|
HANDLE h = pcap_getevent(socket->rawSocket);
|
|
|
|
|
|
|
|
|
|
|
|
for (unsigned i = 0; i < self->nhandles; i++) {
|
|
|
|
unsigned i;
|
|
|
|
|
|
|
|
for (i = 0; i < self->nhandles; i++) {
|
|
|
|
if (self->handles[i] == h) {
|
|
|
|
if (self->handles[i] == h) {
|
|
|
|
memmove(&self->handles[i], &self->handles[i+1], sizeof(HANDLE) * (self->nhandles - i - 1));
|
|
|
|
memmove(&self->handles[i], &self->handles[i+1], sizeof(HANDLE) * (self->nhandles - i - 1));
|
|
|
|
self->nhandles--;
|
|
|
|
self->nhandles--;
|
|
|
|