Fix not ignoring case of uuid given to RegisterEndpoint
Luiz Augusto von Dentz
maintainerPATCH 1/1 Fix not ignoring case of uuid given to RegisterEndpoint
From: Luiz Augusto von Dentz <[email protected]>
--- audio/media.c | 6 +++--- audio/transport.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
audio/media.c +3 -3
@@ -190,19 +190,19 @@ static struct media_endpoint *media_endpoint_create(struct media_adapter *adapte endpoint->size = size; endpoint->adapter = adapter; -if (g_strcmp0 (uuid,A2DP_SOURCE_UUID ) ==0 ) { +if (strcasecmp (uuid,A2DP_SOURCE_UUID ) ==0 ) { endpoint->sep =a2dp_add_sep (&adapter->src,AVDTP_SEP_TYPE_SOURCE , codec, delay_reporting, endpoint);if (endpoint->sep ==NULL ) goto failed; - }else if (g_strcmp0 (uuid,A2DP_SINK_UUID ) ==0 ) { + }else if (strcasecmp (uuid,A2DP_SINK_UUID ) ==0 ) { endpoint->sep =a2dp_add_sep (&adapter->src,AVDTP_SEP_TYPE_SINK , codec, delay_reporting, endpoint);if (endpoint->sep ==NULL ) goto failed; - }else if (g_strcmp0 (uuid,HFP_AG_UUID ) ==0 || + }else if (strcasecmp (uuid,HFP_AG_UUID ) ==0 ||g_strcmp0 (uuid,HSP_AG_UUID ) ==0 ) endpoint->hs_watch =headset_add_state_cb (headset_state_changed, endpoint);
audio/transport.c +4 -4
@@ -711,15 +711,15 @@ struct media_transport *media_transport_create(DBusConnection *conn, transport->fd =-1 ; uuid =media_endpoint_get_uuid (endpoint); -if (g_strcmp0 (uuid,A2DP_SOURCE_UUID ) ==0 || -g_strcmp0 (uuid,A2DP_SINK_UUID ) ==0 ) { +if (strcasecmp (uuid,A2DP_SOURCE_UUID ) ==0 || +strcasecmp (uuid,A2DP_SINK_UUID ) ==0 ) { transport->resume = resume_a2dp; transport->suspend = suspend_a2dp; transport->cancel = cancel_a2dp; transport->get_properties = get_properties_a2dp; transport->set_property = set_property_a2dp; - }else if (g_strcmp0 (uuid,HFP_AG_UUID ) ==0 || -g_strcmp0 (uuid,HSP_AG_UUID ) ==0 ) { + }else if (strcasecmp (uuid,HFP_AG_UUID ) ==0 || +strcasecmp (uuid,HSP_AG_UUID ) ==0 ) { transport->resume = resume_headset; transport->suspend = suspend_headset; transport->cancel = cancel_headset;
Signature · 1 line
1.7.1
Hi Luiz,
Quoted 6 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
--- audio/media.c | 6 +++--- audio/transport.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
Pushed upstream. Thanks.
Johan