src/transport.c
author Krista Bennett <krista@pep-project.org>
Fri, 01 Jun 2018 10:30:19 +0200
branchENGINE-254
changeset 2723 7194b9c8599d
parent 1513 e7f7e42385b5
permissions -rw-r--r--
close branch
     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