From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 3/6] util: Add best dialect picker API
Date: Thu, 03 Feb 2011 14:39:00 -0600 [thread overview]
Message-ID: <4D4B1264.3050102@gmail.com> (raw)
In-Reply-To: <1296739236-24391-4-git-send-email-aki.niemi@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]
Hi Aki,
On 02/03/2011 07:20 AM, Aki Niemi wrote:
> ---
> src/util.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> src/util.h | 7 ++++++
> 2 files changed, 71 insertions(+), 0 deletions(-)
<snip>
> +unsigned char *convert_utf8_to_gsm_best_lang(const char *utf8, long len,
> + long *items_read, long *items_written,
> + unsigned char terminator,
> + enum gsm_dialect hint,
> + enum gsm_dialect *used_locking,
> + enum gsm_dialect *used_single)
> +{
> + enum gsm_dialect locking = GSM_DIALECT_DEFAULT;
> + enum gsm_dialect single = GSM_DIALECT_DEFAULT;
> + unsigned char *encoded;
> +
> + encoded = convert_utf8_to_gsm_with_lang(utf8, len, items_read,
> + items_written, terminator,
> + locking, single);
> + if (encoded != NULL)
> + return encoded;
So this was actually wrong since you were not setting used_locking or
used_single.
> +
> + if (hint == GSM_DIALECT_DEFAULT)
> + return NULL;
> +
> + single = hint;
> + encoded = convert_utf8_to_gsm_with_lang(utf8, len, items_read,
> + items_written, terminator,
> + locking, single);
> + if (encoded != NULL)
> + return encoded;
Same here
> +
> + /* Spanish dialect uses the default locking shift table */
> + if (hint == GSM_DIALECT_SPANISH)
> + return NULL;
> +
> + locking = hint;
> + encoded = convert_utf8_to_gsm_with_lang(utf8, len, items_read,
> + items_written, terminator,
> + locking, single);
> +
> + if (encoded == NULL)
> + return NULL;
> +
> + if (used_locking != NULL)
> + *used_locking = locking;
> +
> + if (used_single != NULL)
> + *used_single = single;
> +
> + return encoded;
> +}
> +
Applied and fixed in a follow on patch.
Regards,
-Denis
next prev parent reply other threads:[~2011-02-03 20:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-03 13:20 [PATCH 0/6] Add alphabet support to SMS Aki Niemi
2011-02-03 13:20 ` [PATCH 1/6] util: Refactor conversion table handling Aki Niemi
2011-02-03 20:38 ` Denis Kenzior
2011-02-03 13:20 ` [PATCH 2/6] smsutil: Remove dialect checks from caller Aki Niemi
2011-02-03 20:01 ` Denis Kenzior
2011-02-03 20:29 ` Aki Niemi
2011-02-03 13:20 ` [PATCH 3/6] util: Add best dialect picker API Aki Niemi
2011-02-03 20:39 ` Denis Kenzior [this message]
2011-02-03 13:20 ` [PATCH 4/6] smsutil: Add alphabet support to encoding Aki Niemi
2011-02-03 20:39 ` Denis Kenzior
2011-02-03 13:20 ` [PATCH 5/6] sms: Add alphabet support to SMS atom Aki Niemi
2011-02-04 18:48 ` Denis Kenzior
2011-02-03 13:20 ` [PATCH 6/6] doc: Add documentation for Alphabet property Aki Niemi
2011-02-03 20:40 ` Denis Kenzior
2011-02-04 18:49 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D4B1264.3050102@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox