Diffstat (limited to 'noncore/net/opietooth/manager/obexftpdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/obexftpdialog.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/noncore/net/opietooth/manager/obexftpdialog.cpp b/noncore/net/opietooth/manager/obexftpdialog.cpp index 2f04ecf..efb3ff2 100644 --- a/noncore/net/opietooth/manager/obexftpdialog.cpp +++ b/noncore/net/opietooth/manager/obexftpdialog.cpp | |||
@@ -114,2 +114,7 @@ ObexFtpDialog::~ObexFtpDialog() | |||
114 | 114 | ||
115 | void ObexFtpDialog::slotBrowse() | ||
116 | { | ||
117 | doBrowse(TRUE); | ||
118 | } | ||
119 | |||
115 | /* | 120 | /* |
@@ -117,3 +122,3 @@ ObexFtpDialog::~ObexFtpDialog() | |||
117 | */ | 122 | */ |
118 | void ObexFtpDialog::slotBrowse() | 123 | void ObexFtpDialog::doBrowse(bool reconnect) |
119 | { | 124 | { |
@@ -151,3 +156,3 @@ void ObexFtpDialog::slotBrowse() | |||
151 | 156 | ||
152 | if (!cli_connect_uuid(use_uuid, len)) { | 157 | if (!cli_connect_uuid(use_uuid, len, reconnect)) { |
153 | log(tr("Connection failed: ") + tr(strerror(errno))); | 158 | log(tr("Connection failed: ") + tr(strerror(errno))); |
@@ -242,3 +247,3 @@ void ObexFtpDialog::slotCd(QListViewItem* item) | |||
242 | log(tr("CD failed: ") + tr(strerror(errno))); | 247 | log(tr("CD failed: ") + tr(strerror(errno))); |
243 | slotBrowse(); | 248 | doBrowse(); |
244 | } | 249 | } |
@@ -335,3 +340,3 @@ void ObexFtpDialog::putFile() | |||
335 | else { | 340 | else { |
336 | slotBrowse(); | 341 | doBrowse(); |
337 | log(local + QString(" sent")); | 342 | log(local + QString(" sent")); |
@@ -373,3 +378,3 @@ void ObexFtpDialog::delFile() | |||
373 | else { | 378 | else { |
374 | slotBrowse(); | 379 | doBrowse(); |
375 | log(file2get + QString(" removed")); | 380 | log(file2get + QString(" removed")); |
@@ -380,7 +385,15 @@ void ObexFtpDialog::delFile() | |||
380 | /* connect with given uuid. re-connect every time */ | 385 | /* connect with given uuid. re-connect every time */ |
381 | int ObexFtpDialog::cli_connect_uuid(const uint8_t *uuid, int uuid_len) | 386 | int ObexFtpDialog::cli_connect_uuid(const uint8_t *uuid, int uuid_len, |
387 | bool reconnect) | ||
382 | { | 388 | { |
383 | int retry; | 389 | int retry; |
384 | if (client != NULL) | 390 | if (client != NULL) { |
391 | if (reconnect) { | ||
392 | obexftp_disconnect(client); | ||
393 | obexftp_close(client); | ||
394 | sleep(3); | ||
395 | } | ||
396 | else | ||
385 | return TRUE; | 397 | return TRUE; |
398 | } | ||
386 | /* Open */ | 399 | /* Open */ |