diff --git a/src_main/io/piethernet.cpp b/src_main/io/piethernet.cpp index d3a192e8..63f54976 100755 --- a/src_main/io/piethernet.cpp +++ b/src_main/io/piethernet.cpp @@ -481,7 +481,7 @@ bool PIEthernet::joinMulticastGroup(const PIString & group) { #ifdef LINUX //mreq.imr_address.s_addr = INADDR_ANY; /*PIEthernet::InterfaceList il = interfaces(); - const PIEthernet::Interface * ci = il.getByAddress(ip_); + const PIEthernet::Interface * ci = il.getByAddress(addr_r.ipString()); if (ci != 0) mreq.imr_ifindex = ci->index;*/ #endif if (params[PIEthernet::Broadcast]) mreq.imr_address.s_addr = INADDR_ANY; diff --git a/src_main/io/piethernet.h b/src_main/io/piethernet.h index 7f1974c0..31d6f2a7 100755 --- a/src_main/io/piethernet.h +++ b/src_main/io/piethernet.h @@ -511,7 +511,7 @@ private: inline bool operator <(const PIEthernet::Interface & v0, const PIEthernet::Interface & v1) {return (v0.name < v1.name);} inline bool operator ==(const PIEthernet::Interface & v0, const PIEthernet::Interface & v1) {return (v0.name == v1.name && v0.address == v1.address && v0.netmask == v1.netmask);} inline bool operator !=(const PIEthernet::Interface & v0, const PIEthernet::Interface & v1) {return (v0.name != v1.name || v0.address != v1.address || v0.netmask != v1.netmask);} -inline PICout operator <<(PICout s, const PIEthernet::Address & v) {s.setControl(0, true); s << "Address(" << v.toString() << ")"; s.restoreControl(); return s;} +inline PICout operator <<(PICout s, const PIEthernet::Address & v) {s.space(); s.setControl(0, true); s << "Address(" << v.toString() << ")"; s.restoreControl(); return s;} inline bool operator ==(const PIEthernet::Address & v0, const PIEthernet::Address & v1) {return (v0.ip() == v1.ip() && v0.port() == v1.port());} inline bool operator !=(const PIEthernet::Address & v0, const PIEthernet::Address & v1) {return (v0.ip() != v1.ip() || v0.port() != v1.port());} diff --git a/src_main/io/pipacketextractor.h b/src_main/io/pipacketextractor.h index c8e04339..69024e60 100755 --- a/src_main/io/pipacketextractor.h +++ b/src_main/io/pipacketextractor.h @@ -159,6 +159,7 @@ private: PIString fullPathPrefix() const {return PIStringAscii("pckext");} PIString constructFullPathDevice() const; bool openDevice() {if (dev == 0) return false; return dev->open();} + bool closeDevice() {if (dev == 0) return false; return dev->close();} DeviceInfoFlags deviceInfoFlags() const {if (dev) return dev->infoFlags(); return 0;} PIIODevice * dev;