cleaning up
authorVolker Birk <vb@pep-project.org>
Wed, 11 May 2016 10:43:10 +0200
changeset 597560c0caf14ef
parent 596 d8b57a6c1e9f
child 598 99a445d62317
child 600 92d2ea181098
cleaning up
src/sync.c
src/sync.h
src/sync_internal.h
     1.1 --- a/src/sync.c	Tue May 10 22:03:19 2016 +0200
     1.2 +++ b/src/sync.c	Wed May 11 10:43:10 2016 +0200
     1.3 @@ -5,23 +5,21 @@
     1.4  #include <assert.h>
     1.5  
     1.6  
     1.7 -PEP_sync_callbacks_t PEP_sync_callbacks = { NULL, NULL, NULL };
     1.8 +PEP_sync_callbacks_t PEP_sync_callbacks = { NULL, NULL };
     1.9  
    1.10  DYNAMIC_API PEP_STATUS register_sync_callbacks(
    1.11 -        sendBeacon_t sendBeacon,
    1.12 +        messageToSend_t messageToSend,
    1.13          showHandshake_t showHandshake
    1.14      )
    1.15  {
    1.16 -    PEP_sync_callbacks.sendBeacon = sendBeacon;
    1.17 -    PEP_sync_callbacks.sendHandshakeRequest = sendBeacon;
    1.18 +    PEP_sync_callbacks.messageToSend = messageToSend;
    1.19      PEP_sync_callbacks.showHandshake = showHandshake;
    1.20  
    1.21      return PEP_STATUS_OK;
    1.22  }
    1.23  
    1.24  DYNAMIC_API void unregister_sync_callbacks(PEP_SESSION session) {
    1.25 -    PEP_sync_callbacks.sendBeacon = NULL;
    1.26 -    PEP_sync_callbacks.sendHandshakeRequest = NULL;
    1.27 +    PEP_sync_callbacks.messageToSend = NULL;
    1.28      PEP_sync_callbacks.showHandshake = NULL;
    1.29  }
    1.30  
     2.1 --- a/src/sync.h	Tue May 10 22:03:19 2016 +0200
     2.2 +++ b/src/sync.h	Wed May 11 10:43:10 2016 +0200
     2.3 @@ -11,7 +11,7 @@
     2.4  extern "C" {
     2.5  #endif
     2.6  
     2.7 -// sendBeacon() - send a beacon message
     2.8 +// messageToSend() - send a beacon message
     2.9  //
    2.10  //  parameters:
    2.11  //      beacon (in)     message struct with beacon message to send
    2.12 @@ -19,7 +19,7 @@
    2.13  //  return value:
    2.14  //      must return PEP_STATUS_OK or any other value on error
    2.15  
    2.16 -typedef PEP_STATUS (*sendBeacon_t)(message beacon);
    2.17 +typedef PEP_STATUS (*messageToSend_t)(message beacon);
    2.18  
    2.19  
    2.20  typedef enum _sync_handshake_result {
    2.21 @@ -46,7 +46,7 @@
    2.22  // register_sync_callbacks() - register adapter's callbacks
    2.23  //
    2.24  //  parameters:
    2.25 -//      sendBeacon (in)             callback for sending beacon
    2.26 +//      messageToSend (in)             callback for sending beacon
    2.27  //      showHandshake (in)          callback for doing the handshake
    2.28  //
    2.29  //  return value:
    2.30 @@ -56,7 +56,7 @@
    2.31  //      call that BEFORE you're using any other part of the engine
    2.32  
    2.33  DYNAMIC_API PEP_STATUS register_sync_callbacks(
    2.34 -        sendBeacon_t sendBeacon,
    2.35 +        messageToSend_t messageToSend,
    2.36          showHandshake_t showHandshake
    2.37      );
    2.38  
     3.1 --- a/src/sync_internal.h	Tue May 10 22:03:19 2016 +0200
     3.2 +++ b/src/sync_internal.h	Wed May 11 10:43:10 2016 +0200
     3.3 @@ -1,10 +1,9 @@
     3.4  #include "sync.h"
     3.5  
     3.6 -typedef sendBeacon_t sendHandshakeRequest_t;
     3.7 +typedef messageToSend_t sendHandshakeRequest_t;
     3.8  
     3.9  typedef struct _PEP_sync_callbacks_t {
    3.10 -    sendBeacon_t sendBeacon;
    3.11 -    sendHandshakeRequest_t sendHandshakeRequest;
    3.12 +    messageToSend_t messageToSend;
    3.13      showHandshake_t showHandshake;
    3.14  } PEP_sync_callbacks_t;
    3.15