src/sync_actions.c
changeset 652 ccc02be8a27d
parent 650 accc0ad7d32c
child 653 a9752fd8d54c
     1.1 --- a/src/sync_actions.c	Wed May 18 08:46:40 2016 +0200
     1.2 +++ b/src/sync_actions.c	Wed May 18 12:21:06 2016 +0200
     1.3 @@ -31,7 +31,17 @@
     1.4      if (!msg)
     1.5          goto enomem;
     1.6  
     1.7 -    
     1.8 +    int32_t seq;
     1.9 +    status = sequence_value(session, "DeviceGroup", &seq);
    1.10 +    if (status != PEP_STATUS_OK)
    1.11 +        goto error;
    1.12 +
    1.13 +    INTEGER_t *sequence = (INTEGER_t *) calloc(1, sizeof(INTEGER_t));
    1.14 +    assert(sequence);
    1.15 +    if (!sequence)
    1.16 +        goto enomem;
    1.17 +    msg->header.sequence = seq;
    1.18 +
    1.19      return status;
    1.20  
    1.21  enomem:
    1.22 @@ -65,7 +75,17 @@
    1.23      if (!msg)
    1.24          goto enomem;
    1.25  
    1.26 -    
    1.27 +    int32_t seq;
    1.28 +    status = sequence_value(session, "DeviceGroup", &seq);
    1.29 +    if (status != PEP_STATUS_OK)
    1.30 +        goto error;
    1.31 +
    1.32 +    INTEGER_t *sequence = (INTEGER_t *) calloc(1, sizeof(INTEGER_t));
    1.33 +    assert(sequence);
    1.34 +    if (!sequence)
    1.35 +        goto enomem;
    1.36 +    msg->header.sequence = seq;
    1.37 +
    1.38      return status;
    1.39  
    1.40  enomem:
    1.41 @@ -192,7 +212,17 @@
    1.42      if (!msg)
    1.43          goto enomem;
    1.44  
    1.45 -    
    1.46 +    int32_t seq;
    1.47 +    status = sequence_value(session, "DeviceGroup", &seq);
    1.48 +    if (status != PEP_STATUS_OK)
    1.49 +        goto error;
    1.50 +
    1.51 +    INTEGER_t *sequence = (INTEGER_t *) calloc(1, sizeof(INTEGER_t));
    1.52 +    assert(sequence);
    1.53 +    if (!sequence)
    1.54 +        goto enomem;
    1.55 +    msg->header.sequence = seq;
    1.56 +
    1.57      return status;
    1.58  
    1.59  enomem: