src/transport.c
author Neal H. Walfield <neal@pep.foundation>
Wed, 08 May 2019 12:20:37 +0200
branchemail_comparison
changeset 3649 1dd837adc30b
parent 1513 e7f7e42385b5
permissions -rw-r--r--
Fix public key.
     1 // This file is under GNU General Public License 3.0
     2 // see LICENSE.txt
     3 
     4 #include "pEp_internal.h"
     5 #include "trans_auto.h"
     6 
     7 #include <memory.h>
     8 #include <assert.h>
     9 
    10 PEP_transport_t transports[PEP_trans__count];
    11     
    12 PEP_STATUS init_transport_system(PEP_SESSION session, bool in_first)
    13 {
    14     assert(session);
    15     session->transports = transports;
    16 
    17     if (in_first) {
    18         assert(PEP_trans__count == 1);
    19         memset(transports, 0, sizeof(PEP_transport_t) * PEP_trans__count);
    20 
    21         transports[PEP_trans_auto].id = PEP_trans_auto;
    22         transports[PEP_trans_auto].sendto = auto_sendto;
    23         transports[PEP_trans_auto].readnext = auto_readnext;
    24     }
    25 
    26     return PEP_STATUS_OK;
    27 }
    28 
    29 void release_transport_system(PEP_SESSION session, bool out_last)
    30 {
    31     assert(session);
    32     // nothing yet
    33 }
    34