With some work, I have obexftp GETting files from my SE T610 via bluetooth.
Evidently there are 2 ways a SETPATH command can be used. It is either
a normal "chdir" command, or it is a "mkdir" followed by "chdir". This
depends on the flags set in the command itself.
While most devices seem to work with the "don't create" flag unset,
the T610 fails with an "Unauthorized" error, even if the SETPATH is
for a valid path and nothing would be created.
This patch changes the behavior of the '-c' command to set the
don't create flag for SETPATH. Another command '-C' is introduced
which exhibits the old behavior. (You might want to switch this if
command-line backward compatibility is really important.)
Publicly, two new functions are added to the header files:
int obexftp_setpath_dont_create(obexftp_client_t *cli, /*@null@*/ const char *n
/*@null@*/ obex_object_t *obexftp_build_setpath_dont_create (obex_t obex, const
The old versions of these functions are still there and have the old behavior.
This was done to preserve compatibility. Internally, a few things are
shuffled around, but only in static functions. These two new functions
should be the only visible changes.
I also changed the visit and put functions to use the dont_create variants
of setpath. I figured this would allow the best compatibility (at least
for visit). The put call may want to go back to the original functionality
for SETPATH, if necessary. This is in obexftp/client.c.
The patch below implements my changes. It was made against version
0.10.4-rc3. Please let me know if you have any questions or need me
to clean up the patch. It is pretty simple, but does move things around
a bit. Also, I am not sure of the correct indent/tab style for this project.
I have done the best I can.
Get latest updates about Open Source Projects, Conferences and News.