diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-06-18 06:36:33 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-06-18 06:36:33 (GMT) |
commit | 2b09eb0937985015e1ecc42a8bd39f0bc4c84b17 (patch) | |
tree | fe249a53164b3cfba3e607ecc61874ac62af4602 | |
parent | 53c3e52cbd7194ef2e2e4b4648f5fac9cd780930 (diff) | |
download | Qt-2b09eb0937985015e1ecc42a8bd39f0bc4c84b17.zip Qt-2b09eb0937985015e1ecc42a8bd39f0bc4c84b17.tar.gz Qt-2b09eb0937985015e1ecc42a8bd39f0bc4c84b17.tar.bz2 |
Fixed FTP default IAP setting. Accidentaly reverted by ce409be66.
It is important to close the RConnection before calling setdefaultif.
This because setdefaultif triesd to open the connection, and if it is
already open it may fail.
-rw-r--r-- | examples/network/ftp/main.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/network/ftp/main.cpp b/examples/network/ftp/main.cpp index 118dcfc..17423b8 100644 --- a/examples/network/ftp/main.cpp +++ b/examples/network/ftp/main.cpp @@ -112,15 +112,14 @@ static void setDefaultIapL() { User::LeaveIfError(conn.GetDesSetting(TPtrC(KIapNameSetting), iap8Name)); iap8Name.ZeroTerminate(); + conn.Stop(); + CleanupStack::PopAndDestroy(&conn); + CleanupStack::PopAndDestroy(&serv); + struct ifreq ifReq; strcpy( ifReq.ifr_name, (char*)iap8Name.Ptr()); User::LeaveIfError(setdefaultif( &ifReq )); - conn.Stop(); - conn.Close(); - serv.Close(); - CleanupStack::PopAndDestroy(&conn); - CleanupStack::PopAndDestroy(&serv); } monitor.Close(); CleanupStack::PopAndDestroy(&monitor); |