diff options
author | Alin Năstac <mrness@gentoo.org> | 2006-06-02 18:57:18 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2006-06-02 18:57:18 +0000 |
commit | 721bc51f215816802e927f1e7826d8f75d6d1c52 (patch) | |
tree | 5424f5c76daeeebc25e665e487211c4b1e2ffefb /app-mobilephone/obexftp/files | |
parent | x86 (diff) | |
download | gentoo-2-721bc51f215816802e927f1e7826d8f75d6d1c52.tar.gz gentoo-2-721bc51f215816802e927f1e7826d8f75d6d1c52.tar.bz2 gentoo-2-721bc51f215816802e927f1e7826d8f75d6d1c52.zip |
Version bump.
(Portage version: 2.0.54-r2)
Diffstat (limited to 'app-mobilephone/obexftp/files')
-rw-r--r-- | app-mobilephone/obexftp/files/digest-obexftp-0.19 | 3 | ||||
-rw-r--r-- | app-mobilephone/obexftp/files/digest-obexftp-0.21 | 1 | ||||
-rw-r--r-- | app-mobilephone/obexftp/files/obexftp-0.21-cobex_write.patch | 60 |
3 files changed, 61 insertions, 3 deletions
diff --git a/app-mobilephone/obexftp/files/digest-obexftp-0.19 b/app-mobilephone/obexftp/files/digest-obexftp-0.19 deleted file mode 100644 index 65160f785076..000000000000 --- a/app-mobilephone/obexftp/files/digest-obexftp-0.19 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 895212816ca94a8b56090d8671dc18fa obexftp-0.19.tar.gz 460515 -RMD160 f138815169814ff0e6fdcfff06a0f4ce67e872e0 obexftp-0.19.tar.gz 460515 -SHA256 31bb37aa5ab0d4c4dda9cdd908876adc8e3d2606924f9d350d10eac5ea5bdb1b obexftp-0.19.tar.gz 460515 diff --git a/app-mobilephone/obexftp/files/digest-obexftp-0.21 b/app-mobilephone/obexftp/files/digest-obexftp-0.21 new file mode 100644 index 000000000000..a00445972df3 --- /dev/null +++ b/app-mobilephone/obexftp/files/digest-obexftp-0.21 @@ -0,0 +1 @@ +MD5 b01d5388b5ae1aa3766301f70576ae6a obexftp-0.21.tar.bz2 353862 diff --git a/app-mobilephone/obexftp/files/obexftp-0.21-cobex_write.patch b/app-mobilephone/obexftp/files/obexftp-0.21-cobex_write.patch new file mode 100644 index 000000000000..db80309a5d8a --- /dev/null +++ b/app-mobilephone/obexftp/files/obexftp-0.21-cobex_write.patch @@ -0,0 +1,60 @@ +diff -Nru obexftp-0.21.orig/multicobex/multi_cobex.c obexftp-0.21/multicobex/multi_cobex.c +--- obexftp-0.21.orig/multicobex/multi_cobex.c 2005-11-24 16:55:11.000000000 +0200 ++++ obexftp-0.21/multicobex/multi_cobex.c 2006-06-02 21:53:07.483151000 +0300 +@@ -126,7 +126,7 @@ + /* Called from OBEX-lib when data needs to be written */ + int cobex_write(obex_t *self, void *data, uint8_t *buffer, int length) + { +- int actual; ++ int written; + cobex_t *c; + return_val_if_fail (self != NULL, -1); + return_val_if_fail (data != NULL, -1); +@@ -137,24 +137,37 @@ + DEBUG(3, "%s() Data %d bytes\n", __func__, length); + + if (c->type == CT_ERICSSON || c->type == CT_SIEMENS) { +- actual = write(c->fd, buffer, length); +- if (actual < length) { +- DEBUG(1, "Error writing to port (%d expected %d)\n", actual, length); +- return actual; /* or -1? */ ++ int retries=0, chunk, fails=0; ++ written = 0; ++ for (retries = 0; written < length; retries++) { ++ chunk = write(c->fd, buffer+written, length-written); ++ if (chunk <= 0) { ++ if ( ++fails >= 10 ) { // to avoid infinite looping if something is really wrong ++ DEBUG(1, "%s() Error writing to port (written %d bytes out of %d, in %d retries)\n", __func__, written, length, retries); ++ return written; ++ } ++ usleep(1); // This mysteriously avoids a resource not available error on write() ++ } else { ++ written += chunk; ++ fails = 0; // Reset error counter on successful write op ++ } + } +- return actual; ++ ++ if (retries > 0) ++ DEBUG(2, "%s() Wrote %d bytes in %d retries\n", __func__, written, retries); ++ return written; + } + + if (c->seq == 0){ +- actual = bfb_send_first(c->fd, buffer, length); +- DEBUG(2, "%s() Wrote %d first packets (%d bytes)\n", __func__, actual, length); ++ written = bfb_send_first(c->fd, buffer, length); ++ DEBUG(2, "%s() Wrote %d first packets (%d bytes)\n", __func__, written, length); + } else { +- actual = bfb_send_next(c->fd, buffer, length, c->seq); +- DEBUG(2, "%s() Wrote %d packets (%d bytes)\n", __func__, actual, length); ++ written = bfb_send_next(c->fd, buffer, length, c->seq); ++ DEBUG(2, "%s() Wrote %d packets (%d bytes)\n", __func__, written, length); + } + c->seq++; + +- return actual; ++ return written; + } + + /* Called when input data is needed */ |