From: Lukasz Pawlik <lucas.pawlik@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Lukasz Pawlik <lucas.pawlik@gmail.com>
Subject: [PATCH] Fix problem with operator name length
Date: Wed, 13 Oct 2010 14:49:30 +0200 [thread overview]
Message-ID: <1286974170-12282-1-git-send-email-lucas.pawlik@gmail.com> (raw)
To follow the HFP specification we must ensure that network operator name
will have at maximum 16 characters. In current implementation we do not
check this constraint. This patch fix this. Now operator name with more
than 16 characters will be truncated to 16 characters.
---
audio/telephony-maemo6.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index 1aac034..bbd2d2f 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -1498,8 +1498,7 @@ static void update_operator_name(const char *name)
return;
g_free(net.operator_name);
- net.operator_name = g_strdup(name);
-
+ net.operator_name = g_strndup(name, 16);
DBG("telephony-maemo6: operator name updated: %s", name);
}
--
1.7.0.4
next reply other threads:[~2010-10-13 12:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-13 12:49 Lukasz Pawlik [this message]
2010-10-13 14:19 ` [PATCH] Fix problem with operator name length Johan Hedberg
2010-10-13 14:52 ` Dmitriy Paliy
2010-10-13 15:09 ` Johan Hedberg
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=1286974170-12282-1-git-send-email-lucas.pawlik@gmail.com \
--to=lucas.pawlik@gmail.com \
--cc=linux-bluetooth@vger.kernel.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