diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2012-03-28 12:03:19 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-03-28 13:17:39 +0300 |
commit | e26b01d25b70b629aaa0f90a801636b6d193385e (patch) | |
tree | cc347d42432afc24eb25c0e41c9dce214d85737c /serial | |
parent | b45b981202c0d84b1dc1edc4501849f194243d08 (diff) | |
download | bluez-e26b01d25b70b629aaa0f90a801636b6d193385e.tar.gz |
Move common code to sdp to avoid duplication
LanguageBaseAttributeIDList is set from few places and each time static
function was copied and used for that. Move this funtion to sdp code
and use that instead of copying code.
Diffstat (limited to 'serial')
-rw-r--r-- | serial/proxy.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/serial/proxy.c b/serial/proxy.c index 736f69085..ea5c29fe0 100644 --- a/serial/proxy.c +++ b/serial/proxy.c @@ -130,20 +130,6 @@ static void proxy_free(struct serial_proxy *prx) g_free(prx); } -static void add_lang_attr(sdp_record_t *r) -{ - sdp_lang_attr_t base_lang; - sdp_list_t *langs = 0; - - /* UTF-8 MIBenum (http://www.iana.org/assignments/character-sets) */ - base_lang.code_ISO639 = (0x65 << 8) | 0x6e; - base_lang.encoding = 106; - base_lang.base_offset = SDP_PRIMARY_LANG_BASE; - langs = sdp_list_append(0, &base_lang); - sdp_set_lang_attr(r, langs); - sdp_list_free(langs, 0); -} - static sdp_record_t *proxy_record_new(const char *uuid128, uint8_t channel) { sdp_list_t *apseq, *aproto, *profiles, *proto[2], *root, *svclass_id; @@ -186,7 +172,7 @@ static sdp_record_t *proxy_record_new(const char *uuid128, uint8_t channel) aproto = sdp_list_append(NULL, apseq); sdp_set_access_protos(record, aproto); - add_lang_attr(record); + sdp_add_lang_attr(record); sdp_set_info_attr(record, "Serial Proxy", NULL, "Serial Proxy"); |