ignore errorcount if force_interface is set
@@ -5629,11 +5629,7 @@ strncpy(pwrq.ifr_name, interfacename, IFNAMSIZ -1);
pwrq.u.freq.flags = IW_FREQ_FIXED;
pwrq.u.freq.m = channelscanlist[cpa];
pwrq.u.freq.e = 0;
-if(ioctl(fd_socket, SIOCSIWFREQ, &pwrq) < 0)
- {
- if(forceinterfaceflag == false) return false;
- return true;
- }
+if(ioctl(fd_socket, SIOCSIWFREQ, &pwrq) < 0) return false;
if(ioctl(fd_socket, SIOCGIWFREQ, &pwrq) == 0) aktchannel = pwrq.u.freq.m;
return true;
}
@@ -5979,7 +5975,7 @@ while(wantstopflag == false)
if(errorcount >= maxerrorcount)
{
fprintf(stderr, "\nmaximum number of errors is reached\n");
- globalclose();
+ if(forceinterfaceflag == false) globalclose();
}
if(gpiobutton > 0)
{
@@ -6306,7 +6302,7 @@ while(wantstopflag == false)
if(errorcount >= maxerrorcount)
{
fprintf(stderr, "\nmaximum number of errors is reached\n");
- globalclose();
+ if(forceinterfaceflag == false) globalclose();
}
if(gpiobutton > 0)
{
@@ -6421,7 +6417,7 @@ while(wantstopflag == false)
if(errorcount >= maxerrorcount)
{
fprintf(stderr, "\nmaximum number of errors is reached\n");
- globalclose();
+ if(forceinterfaceflag == false) globalclose();
}
if(gpiobutton > 0)
{
