src/pEpEngine.c
changeset 1603 f954f77387f1
parent 1602 904da6719597
child 1604 a39c90afab13
     1.1 --- a/src/pEpEngine.c	Wed Feb 22 19:26:45 2017 +0100
     1.2 +++ b/src/pEpEngine.c	Wed Feb 22 23:23:41 2017 +0100
     1.3 @@ -621,6 +621,10 @@
     1.4      _session->use_only_own_private_keys = false;
     1.5  #endif
     1.6  
     1.7 +    // sync_session set to own session by default
     1.8 +    // sync_session is then never null on a valid session
     1.9 +    _session->sync_session = _session;
    1.10 +
    1.11      *session = _session;
    1.12      return PEP_STATUS_OK;
    1.13  
    1.14 @@ -2032,7 +2036,8 @@
    1.15          own = 1;
    1.16      }
    1.17      else {
    1.18 -        if (name == session->sync_uuid || strcmp(name, session->sync_uuid) == 0)
    1.19 +        if (name == session->sync_session->sync_uuid || 
    1.20 +            strcmp(name, session->sync_session->sync_uuid) == 0)
    1.21              own = 1;
    1.22      }
    1.23