diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-06-18 09:36:33 +0300 |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-06-18 09:36:33 +0300 |
commit | 2b09eb0937985015e1ecc42a8bd39f0bc4c84b17 (patch) | |
tree | fe249a53164b3cfba3e607ecc61874ac62af4602 /examples/network | |
parent | 53c3e52cbd7194ef2e2e4b4648f5fac9cd780930 (diff) |
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.
Diffstat (limited to 'examples/network')
-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 118dcfc5c6..17423b834b 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); |