This patch comes from below commit of upstream.
commit
d6c07ecf22ba60d6dd1b7302281eb32e1f278ca7
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Tue May 30 14:40:56 2017 +0300
shared/gatt-client: Fix removing services with no attributes
If a service has no attributes, like IPSS, just mark it as active and
skip doing any attribute discover.
Change-Id: I08eac1787f95fd091470496764bf8cf9924c0520
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
{
/* Skip if service already active */
if (!gatt_db_service_get_active(attr)) {
- queue_push_tail(op->pending_svcs, attr);
+ /* Skip if there are no attributes */
+ if (end == start)
+ gatt_db_service_set_active(attr, true);
+ else
+ queue_push_tail(op->pending_svcs, attr);
/* Update discovery range */
if (!op->svc_first || op->svc_first > start)