Commit: 622b33900419f41143600dc9e65f2a8e8ab15219
Parent: 0b2354016f12d25bc40aa2d3429ddac9dea92f22
Author: Rafal Michalski <michalski.raf@gmail.com>
Committer: Marcel Holtmann <marcel@holtmann.org>
Date: 2012-12-04 23:48:45
Tree: 1694f6c47ecf2a5f18db4ddcb071d165cdc212c5

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.

Diffstat

M obexd/plugins/vcard.c | 8 +++- - - - -

1 files changed, 3 insertions(+), 5 deletions(-)

View Full Diff | Patch