OK I did not know about this API, I will give it a go and see if it solves the problem. Thanks
Added after 1 21 minutes:
I tried to use Qt Mobility but in my scenario it is useless. The reason I need to disable and enable network interface is that my network card sometimes (randomly) gets disabled by my Linux (Slackware 13.37) kernel.
I tried to resolve that issue at Linux forums but as it seems its a bug in Slackware release or with my card driver. Anyway the only workaround is to disable and enable the card that makes it reusable without restarting the system.
I tried doing the same thing with Qt API but it seems it can not disable the interface. It gives error "The requested operation is not supported by the system"
Anyway! You were spot on ... it was a race condition because it takes some time for the network interface to become available, so I forced it to delay (sleep(5)) for 5 seconds and it solved my problem. Thanks once again.![]()
Bookmarks