PIIODevice registration dramatically optimization

This commit is contained in:
2022-04-30 11:21:57 +03:00
parent 19e4eee222
commit 2bbdbc3ac9
29 changed files with 138 additions and 78 deletions

View File

@@ -21,6 +21,7 @@
#include "piconfig.h"
#include "pisysteminfo.h"
#include "pipropertystorage.h"
#include "piconstchars.h"
#ifdef QNX
# include <net/if.h>
# include <net/if_dl.h>
@@ -919,10 +920,11 @@ bool PIEthernet::configureDevice(const void * e_main, const void * e_parent) {
}
void PIEthernet::propertyChanged(const PIString & name) {
if (name.endsWith("Timeout")) applyTimeouts();
if (name == "TTL") applyOptInt(IPPROTO_IP, IP_TTL, TTL());
if (name == "MulticastTTL") applyOptInt(IPPROTO_IP, IP_MULTICAST_TTL, multicastTTL());
void PIEthernet::propertyChanged(const char * name) {
PIConstChars pn(name);
if (pn.endsWith("Timeout")) applyTimeouts();
if (pn == "TTL") applyOptInt(IPPROTO_IP, IP_TTL, TTL());
if (pn == "MulticastTTL") applyOptInt(IPPROTO_IP, IP_MULTICAST_TTL, multicastTTL());
}