making enable_identity_for_sync() harmless in case device is not yet grouped sync
authorVolker Birk <vb@pep-project.org>
Tue, 27 Aug 2019 11:09:48 +0200
branchsync
changeset 4017df3fdb653cc4
parent 4006 f94802409ab4
child 4018 1773c1ac046a
child 4022 357880cb4cc3
child 4025 230d40bece8a
child 4052 ac9cba3fc8c2
making enable_identity_for_sync() harmless in case device is not yet grouped
src/sync_api.c
     1.1 --- a/src/sync_api.c	Wed Aug 21 11:18:38 2019 +0200
     1.2 +++ b/src/sync_api.c	Tue Aug 27 11:09:48 2019 +0200
     1.3 @@ -257,7 +257,13 @@
     1.4      if (status)
     1.5          return status;
     1.6  
     1.7 -    status = set_identity_flags(session, ident, PEP_idf_devicegroup);
     1.8 +    bool grouped;
     1.9 +    status = deviceGrouped(session, &grouped);
    1.10 +    if (status)
    1.11 +        return status;
    1.12 +
    1.13 +    if (grouped)
    1.14 +        status = set_identity_flags(session, ident, PEP_idf_devicegroup);
    1.15      return status;
    1.16  }
    1.17