| dcab04f1 |
obexd: Introduce obex_get_non_header_data
This function remove the need of calling OBEX_ObjectGetNonHdrData in the
plugins. |
Luiz Augusto von Dentz |
13 years ago |
6 files, +20, -6 |
| 1704feb9 |
obexd: syncevolution: remove unnecessary openobex includes |
Luiz Augusto von Dentz |
13 years ago |
1 file, +0, -3 |
| cf54532d |
obexd: remove unnecessary openobex includes |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -3 |
| 8c9942c4 |
obexd: Remove use of obex_object_t on obex.h
Plugins including obex.h need to include openobex headers because of
this. |
Luiz Augusto von Dentz |
13 years ago |
4 files, +17, -18 |
| e682892a |
obexd: Remove unused function obex_aparam_write |
Luiz Augusto von Dentz |
13 years ago |
2 files, +0, -13 |
| e24d619f |
obexd: phonebook-tracker: Seek for contact name deeper
Some contacts in Tracker can have no name fields set nor nickname. This
patch enhances the way the contact name is obtained:
1) If there is no nco:nickname set for contact, use nco:imNickname from
its related IM data.
2) As the N field is mandatory in both vCard 2.1 and 3.0 and it's the
most useful field for PBAP clients, if its components are not present
in Tracker, use nco:fullname (thus promote FN to N) or if nco:fullname
is also not present, then use previously obtained nickname for N field. |
Slawomir Bochenski |
13 years ago |
1 file, +81, -10 |
| 0a3fef04 |
obexd: Fix empty parameter list in function declaration |
Syam Sidhardhan |
13 years ago |
4 files, +4, -4 |
| 7ffd0a2e |
obexd: Fix missing URL vCard's field with OTHER subtype
Previously URL vCard's field (imported with default OTHER subtype) was
missing after pulling entire phonebook or single vCard (for phonebook
and each call history as well).
This patch fixes that issue by adjusting queries to URL field. |
Rafal Michalski |
13 years ago |
1 file, +4, -6 |
| 1f3e8d2f |
obexd: fix coding style
Make use of tabs instead of spaces |
Luiz Augusto von Dentz |
13 years ago |
1 file, +15, -15 |
| 2cbf0ddd |
obexd: remove unnecessary includes
As a mimetype driver only plugin filesystem should not depend on
service.h nor obex.h |
Luiz Augusto von Dentz |
13 years ago |
1 file, +6, -6 |
| eea0ef5d |
obexd: Make obex_server_init to initialized all services registered
This way we don't have to keep adding new entries to main.c everytime
a new service is introduced. |
Luiz Augusto von Dentz |
13 years ago |
4 files, +35, -30 |
| b53c0f20 |
obexd: Move secure flag to service driver
The driver already define the channel so it makes sense to have the
secure flag in the same place. |
Luiz Augusto von Dentz |
13 years ago |
11 files, +25, -20 |
| cd801663 |
obexd: Fix dbus memory leak |
Syam Sidhardhan |
13 years ago |
1 file, +2, -0 |
| 18f3c34d |
obexd: remove pcsuite code
pcsuite code has been moved to pcsuite plugin and this code is no
longer used. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +0, -55 |
| c1781674 |
obexd: Remove options per server
Options are general so it is pointless to copy them to each server. |
Luiz Augusto von Dentz |
13 years ago |
9 files, +35, -76 |
| f87d83c8 |
obexd: Removed unused fields of obex_server |
Luiz Augusto von Dentz |
13 years ago |
1 file, +0, -2 |
| 3f038ba4 |
obexd: Remove config.h from src/obex.h
config.h should only be included in .c files |
Luiz Augusto von Dentz |
13 years ago |
1 file, +0, -4 |
| c0ad77f7 |
obexd: Fix crash on error in agent_request_reply
This fixes regression introduced by
63becff48820dc50a30ae495e286e858a886d9dd, causing obex-client to crash
in cases of e.g. remote site rejecting pushed file.
The req->function set by user of agent API may request agent object
deletion. This in turn checks if agent->pending is set and if it is,
it tries to cancel the pending call and frees pending call data. As at
this point we are already handling call response and we are going to
free this pending call data, agent->pending can be set to NULL prior to
calling req->function, thus preventing premature freeing of later
dereferenced req. |
Slawomir Bochenski |
13 years ago |
1 file, +2, -1 |
| 82fbbb6b |
obexd: Fix pulling single vCard for parameters header missing
According to PBAP specification (ANNEX A), all application-parameters
are optional in case of pulling single vCard entry, so header for
application-parameters can be omitted, and it would be valid as well.
Previously pulling single vCard was always failing with "Bad Request"
status in such a circumstance.
This patch fixes that issue and pulling single vCard is done successfully
with "OK" status. Output vCard would contain all fields under 2.1 format
(as for default settings). |
Rafal Michalski |
13 years ago |
1 file, +6, -2 |
| 38e0847e |
obexd: Fix breaking long lines in vCard's fields
Previously limit length for vCard's (vCard 2.1 with Quoted Printable
encoding) property line was always set as 75 (QP_LINE_LEN), after
processing each single subfield (for instance under ADR property).
Thus it was not possible to reach limit equal to 0 (then breaking line
is required) for all property subfields.
This patch fixes that issue and length of first line, containing property
parameters, is limited as well. |
Rafal Michalski |
13 years ago |
1 file, +7, -2 |
| ec7d9656 |
obexd: Support for encoding UTF-8 characters in vCard's fields
This patch provides additional condition for selection of Quoted Printable
encoding (for vCard's 2.1 fields). It will be satisfied if there is any
byte which value is out of range standard ASCII set. Such byte may be
a part of sequence (composed of more than single byte) for non-standard
characters specified by UTF-8 and if detected, CHARSET parameter for
property is set as "UTF-8".
This fix is required since without such improvement some carkits may
display non-standard characters incorrectly (for instance they may be
omitted completely). |
Rafal Michalski |
13 years ago |
1 file, +46, -2 |
| 5f73860f |
obexd: Add check for empty string in vcard_printf_fullname
If tag value is empty there is possibility to quickly create
empty tag without entering to rest of the logic.
Checking for empty parameter at the begining is included
basicaly in every print tag function in code - here somehow
was missing. |
Radoslaw Jablonski |
13 years ago |
1 file, +5, -0 |
| 93f6f455 |
obexd: Fix OPP not sending TransferCompleted signal
Commit 934b3b2f5f8432b67822be9f83a141fe3783cbd7 introduced a regression
in OPP, by making it not send TransferCompleted signal. This happened
because OPP was calling manager_emit_transfer_completed() on .reset(),
and manager_emit_transfer_completed() in turn checks if the os->object
is not NULL. This fixes this by moving clearing os->object after doing
service driver .reset(). |
Slawomir Bochenski |
13 years ago |
1 file, +2, -2 |
| f0f5cbcc |
obexd: Fix possible crash when using syncevolution plugin
Context os need to be set since synce_write uses it, in addiction
check if context is valid in synce_open. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +4, -1 |
| 63296fb1 |
obexd: Pass through error returned by open in PUTs |
Slawomir Bochenski |
13 years ago |
1 file, +1, -1 |
| 6df190c8 |
obexd: Remove unnecessary code line breaking
This patch removes unnecessary code line breaking. |
Rafal Michalski |
13 years ago |
1 file, +1, -2 |
| 03f4a2e6 |
obexd: Add NULL-field checking in vcard_printf_address
Without that checking strlen(..) could be called with NULL
as param and this will result crash (in some scenarios
'field' may be NULL) |
Radoslaw Jablonski |
13 years ago |
1 file, +5, -2 |
| 0994419d |
obexd: Simplify code for calling mime driver flush()
OBEX_EV_REQ is the last thing that we are going to receive on PUT and
this is always going to be delivered. As the service driver will start
receiving data at or before its .put(), we can simply call flush() after
that. This also makes flush() usable in PUTs without length header. |
Slawomir Bochenski |
13 years ago |
1 file, +10, -18 |
| 0c44f9ad |
obexd: Utilise os_set_response in check_put |
Slawomir Bochenski |
13 years ago |
1 file, +1, -10 |
| b39b605f |
obexd: Write pending bytes only if mime object is open
Without this in case of "non-checked" PUT there were calls to write()
prior to any obex_put_stream_start(). |
Slawomir Bochenski |
13 years ago |
1 file, +1, -1 |
| 9857369d |
obexd: Fix missing format in call to g_error_new |
Slawomir Bochenski |
13 years ago |
1 file, +1, -1 |
| db4e3be9 |
obexd: Reverse order of calls in os_reset_session
This replaces:
service->get/put, mime->open, ..., service->reset, mime->close
logic, with a more appropriate:
service->get/put, mime->open, ..., mime->close, service->reset |
Slawomir Bochenski |
13 years ago |
1 file, +3, -2 |
| 230e706f |
obexd: Fix possible crash when indicating progress
The amount of transferred bytes should only be updated after it has
been sent. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +2, -2 |
| 622b3390 |
obexd: Simplify vCard's phone number printing
Previously, it was trynig to create string (by snprintf function
and stored in "buf" buffer) containing "%s" formatting piece for
"vcard_printf" function.
In this case "\%" is not valid escape sequence (it is "%%" for percent
character) - backslash is ignored, so sequence "\%s" is treated as "%s"
and replaced by string for "number" field when snprintf function is
executed. Hence "vcard_printf" function has nothing to do with "number"
field, since "buf" does not contain any "%s" formatting sequence.
This patch make simplification for printing phone number field by
avoiding storing formatting pieces (for instance "%%s"). Now string
for phone number field is stored directly in "field" buffer
(common with Quoted Printable encoding) and simply passed to
"vcard_printf" function. |
Rafal Michalski |
13 years ago |
1 file, +3, -5 |
| 96ca20c8 |
obexd: Remove unnecessary character in comment
This patch removes unnecessary comment's character. |
Rafal Michalski |
13 years ago |
1 file, +1, -1 |
| 19737e50 |
obexd: Remove unnecessary empty lines
This patch removes unnecessary empty lines. |
Rafal Michalski |
13 years ago |
2 files, +0, -2 |
| 31795baa |
obexd: Fix minor coding style issues in filesystem.c |
Johan Hedberg |
13 years ago |
1 file, +2, -5 |
| 6c56e60d |
obexd: Fix target size in Connect reply WHO header
Not all targets are 16 bytes (e.g. SyncML is 9). |
Johan Hedberg |
13 years ago |
1 file, +1, -1 |
| b58216bb |
obexd: Support for Quoted Printable encoding
According to vCard 2.1 specification, this patch provides Quoted Printable
encoding (described in RFC1521 document), which is specific for vCard 2.1
formatting and should be preferable for instance, if vcard's property
field contains multiple lines (vCard's 2.1 spec. says: Multiple lines
of formatted text are separated with a Quoted Printable CRLF sequence
of "=0D" followed by "=0A" followed by a Quoted Printable softline
break sequence of "=").
In general all characters can be replaced with "=<Hex>" where "<Hex>"
is the 2-character hexadecimal representation of the character's decimal
value. Characters with decimal values of 33 through 60 inclusive, and 62
through 126, inclusive, may be represented as the ASCII characters.
Quoted Printable lines of text must also be limited to less than 76
characters. For longer lines soft line breaks must be used - an equal sign
as the last character on a encoded line indicates such soft line break
in the encoded text.
In this case, Quoted Printable is selected, if vCard's 2.1 field contains
newline character or some specific ASCII character from set:
'!', '"', '#', '$', '@', '[', '\', ']', '^', '`', '{', '|', '}', '~'.
(it is not mandatory but each character from this set will be encoded
as Quoted Printable spec. suggests).
Equal sign character in vCard's field is always encoded (it is mandatory
and Quoted Printable encoding is taken into account if this character present
in vCard's field) since it is special character used for encoding characters
and indicating soft line breaks.
Horizontal tab and space characters are always encoded. It's mandatory only
if they are not followed by any other character. Always encoding makes
simplification, since we don't need to care about position of these characters.
According to vCard 2.1 specification semicolon character, present in vCard's
field, must be escaped with backslash character. Since backslash is always
encoded it gives sequence "=5C;" (instead of "\;"). |
Rafal Michalski |
13 years ago |
1 file, +196, -3 |
| d882e5c6 |
obexd: Escape semicolons in vCard's fields
This patch provides possibility to escape only semicolon character
in vCard's fields, as vCard 2.1 specification requires
(for comparision vCard 3.0 requires escaping for set of characters:
'\n', '\r', ';', ',', '\'). |
Rafal Michalski |
13 years ago |
1 file, +33, -6 |
| c948d5b9 |
obexd: Fix g_filename_to_utf8 failure check |
Johan Hedberg |
13 years ago |
1 file, +1, -1 |
| 0b235401 |
obexd: Remove magic number indicating size of buffer
This patch removes "magic number" indicating buffer's size
in "vcard_printf_number" function and replace it by value defined under
LEN_MAX. Now it would be consistent with the rest of code, since all
functions from vcard_prinf_* family use LEN_MAX to indicate size
of buffer which may store some vCard's field content. |
Rafal Michalski |
13 years ago |
1 file, +1, -1 |
| 9d1f970e |
obexd: fix possible crash on GetFile
Invalid read of size 8
at 0x413DA1: get_file_callback (ftp.c:184)
by 0x40A74E: transfer_complete (gobex-transfer.c:73)
by 0x40AB91: transfer_response (gobex-transfer.c:172)
by 0x40847A: handle_response (gobex.c:629)
by 0x408C06: incoming_data (gobex.c:811)
by 0x3E01043DBC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.2910.0)
by 0x3E010445A7: ??? (in /lib64/libglib-2.0.so.0.2910.0)
by 0x3E01044AF4: g_main_loop_run (in /lib64/libglib-2.0.so.0.2910.0)
by 0x404CD4: main (main.c:102)
Address 0x8 is not stack'd, malloc'd or (recently) free'd |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -1 |
| 34d1a733 |
obexd: Fix semicolon delimiter issue in address fields
Previously semicolon was used as delimiter when address vCard fields
are concatenated (at the moment of fetching from database via query).
It was introducing confusion at the moment of splitting address string
into seperate fields, since these fields may contain semicolons as well.
In this case it leads to treating some semicolons - characters in address
fields - as real delimiters (no escaped but it should) and other
semicolons - real delimiters - as characters in address field
(escaped but it shouldn't).
This patch fixes problem described above, since semicolon delimiter
is replaced by character called Unit Separator (equal to '\37') which
shouldn't be present in address fields. |
Rafal Michalski |
13 years ago |
1 file, +20, -19 |
| a4b60350 |
obexd: Refactoring address fields handled in vcard module
This patch introduces phonebook_addr struct for more intuitive
handling address fields from backend. Now address fields are managed
by linked list (wrapped by structure) and it is used for printing vCard
address fields, instead of buffers set (combined with g_strsplit
and snprintf functions). |
Rafal Michalski |
13 years ago |
3 files, +101, -48 |
| 11f7e9ef |
obexd: Fix memory issue in folder listing |
Bartosz Szatkowski |
13 years ago |
1 file, +3, -2 |
| 8f582cad |
obexd: Fix folder and path handling |
Bartosz Szatkowski |
13 years ago |
1 file, +7, -4 |
| 208d6b06 |
obexd: Minor coding style fixes to mas.c |
Johan Hedberg |
13 years ago |
1 file, +8, -8 |
| e833801e |
obexd: Use pointers to const where appropriate |
Slawomir Bochenski |
13 years ago |
3 files, +17, -19 |
| 027df908 |
obexd: Add basic messages listing retrieval support |
Slawomir Bochenski |
13 years ago |
3 files, +151, -7 |