Bugfixes part 3 #209

Open
andrey wants to merge 36 commits from bugfixes3 into master
Showing only changes of commit 6d75d10ec8 - Show all commits
+2 -1
View File
@@ -73,7 +73,8 @@ bool PICAN::openDevice() {
} }
fcntl(sock, F_SETFL, fcntl(sock, F_GETFL) | O_NONBLOCK); fcntl(sock, F_SETFL, fcntl(sock, F_GETFL) | O_NONBLOCK);
ifreq ifr; ifreq ifr;
strcpy(ifr.ifr_name, path().dataAscii()); piZeroMemory(ifr);
strncpy(ifr.ifr_name, path().dataAscii(), sizeof(ifr.ifr_name));
piCout << "PICAN try to get interface index..."; piCout << "PICAN try to get interface index...";
if (ioctl(sock, SIOCGIFINDEX, &ifr) < 0) { if (ioctl(sock, SIOCGIFINDEX, &ifr) < 0) {
piCoutObj << "Error! while determin the interface ioctl"; piCoutObj << "Error! while determin the interface ioctl";