Commit 22fa20be authored by Robert Karlsson's avatar Robert Karlsson

Removed hard-coded stuff

parent 34424233
......@@ -134,7 +134,7 @@ static pwr_tStatus IoAgentInit (
gethostname(hname, 40);
s = socket(AF_INET, SOCK_DGRAM, 0);
strncpy(ifr.ifr_name, "eth1", sizeof(ifr.ifr_name));
strncpy(ifr.ifr_name, op->EthernetDevice, sizeof(ifr.ifr_name));
if (ioctl(s, SIOCGIFADDR, &ifr) >= 0) {
strcpy(dev_data->ip_address, inet_ntoa(((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr));
}
......@@ -147,7 +147,7 @@ static pwr_tStatus IoAgentInit (
strcpy(dev_data->device_name, hname);
dev_data->device_num = PN_DEVICE_REFERENCE_THIS_STATION;
strcpy(dev_data->device_text, "controller");
strcpy(dev_data->device_text, op->EthernetDevice);
dev_data->vendor_id = 279; // Softing vendor id
dev_data->device_id = 0;
strcpy(dev_data->version, "1.0");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment