src/transport.c
author Volker Birk <vb@pep-project.org>
Fri, 08 May 2015 16:53:39 +0200
changeset 259 71d6c073fda4
parent 125 5119178815d8
child 1513 e7f7e42385b5
permissions -rw-r--r--
fixing database access
     1 #include "pEp_internal.h"
     2 #include "trans_auto.h"
     3 
     4 #include <memory.h>
     5 #include <assert.h>
     6 
     7 PEP_transport_t transports[PEP_trans__count];
     8     
     9 PEP_STATUS init_transport_system(PEP_SESSION session, bool in_first)
    10 {
    11     assert(session);
    12     session->transports = transports;
    13 
    14     if (in_first) {
    15         assert(PEP_trans__count == 1);
    16         memset(transports, 0, sizeof(PEP_transport_t) * PEP_trans__count);
    17 
    18         transports[PEP_trans_auto].id = PEP_trans_auto;
    19         transports[PEP_trans_auto].sendto = auto_sendto;
    20         transports[PEP_trans_auto].readnext = auto_readnext;
    21     }
    22 
    23     return PEP_STATUS_OK;
    24 }
    25 
    26 void release_transport_system(PEP_SESSION session, bool out_last)
    27 {
    28     assert(session);
    29     // nothing yet
    30 }
    31