reuse sendBeacon() for sendHandshakeRequest()
authorVolker Birk <vb@pep-project.org>
Tue, 03 May 2016 16:04:21 +0200
changeset 5743c21749a79a6
parent 573 28b0d3154f0f
child 575 844020ffeb22
reuse sendBeacon() for sendHandshakeRequest()
src/sync.c
src/sync.h
src/sync_internal.h
     1.1 --- a/src/sync.c	Tue May 03 15:57:12 2016 +0200
     1.2 +++ b/src/sync.c	Tue May 03 16:04:21 2016 +0200
     1.3 @@ -9,12 +9,11 @@
     1.4  
     1.5  DYNAMIC_API PEP_STATUS register_sync_callbacks(
     1.6          sendBeacon_t sendBeacon,
     1.7 -        sendHandshakeRequest_t sendHandshakeRequest,
     1.8          showHandshake_t showHandshake
     1.9      )
    1.10  {
    1.11      PEP_sync_callbacks.sendBeacon = sendBeacon;
    1.12 -    PEP_sync_callbacks.sendHandshakeRequest = sendHandshakeRequest;
    1.13 +    PEP_sync_callbacks.sendHandshakeRequest = sendBeacon;
    1.14      PEP_sync_callbacks.showHandshake = showHandshake;
    1.15  
    1.16      return PEP_STATUS_OK;
     2.1 --- a/src/sync.h	Tue May 03 15:57:12 2016 +0200
     2.2 +++ b/src/sync.h	Tue May 03 16:04:21 2016 +0200
     2.3 @@ -22,17 +22,6 @@
     2.4  typedef PEP_STATUS (*sendBeacon_t)(message beacon);
     2.5  
     2.6  
     2.7 -// sendHandshakeRequest() - send a handshake request message
     2.8 -//
     2.9 -//  parameters:
    2.10 -//      request (in)    message struct with beacon message to send
    2.11 -//
    2.12 -//  return value:
    2.13 -//      must return PEP_STATUS_OK or any other value on error
    2.14 -
    2.15 -typedef PEP_STATUS (*sendHandshakeRequest_t)(message request);
    2.16 -
    2.17 -
    2.18  typedef enum _sync_handshake_result {
    2.19      SYNC_HANDSHAKE_CANCEL = -1,
    2.20      SYNC_HANDSHAKE_ACCEPTED = 0,
    2.21 @@ -58,7 +47,6 @@
    2.22  //
    2.23  //  parameters:
    2.24  //      sendBeacon (in)             callback for sending beacon
    2.25 -//      sendHandshakeRequest (in)   callback for sending handshake request
    2.26  //      showHandshake (in)          callback for doing the handshake
    2.27  //
    2.28  //  return value:
    2.29 @@ -69,7 +57,6 @@
    2.30  
    2.31  DYNAMIC_API PEP_STATUS register_sync_callbacks(
    2.32          sendBeacon_t sendBeacon,
    2.33 -        sendHandshakeRequest_t sendHandshakeRequest,
    2.34          showHandshake_t showHandshake
    2.35      );
    2.36  
     3.1 --- a/src/sync_internal.h	Tue May 03 15:57:12 2016 +0200
     3.2 +++ b/src/sync_internal.h	Tue May 03 16:04:21 2016 +0200
     3.3 @@ -1,5 +1,7 @@
     3.4  #include "sync.h"
     3.5  
     3.6 +typedef sendBeacon_t sendHandshakeRequest_t;
     3.7 +
     3.8  typedef struct _PEP_sync_callbacks_t {
     3.9      sendBeacon_t sendBeacon;
    3.10      sendHandshakeRequest_t sendHandshakeRequest;