src/transport.c
author Dirk Zimmermann <dz@pep.security>
Thu, 11 Apr 2019 10:46:46 +0200
branchIOS-1482
changeset 3505 3fe4b41696d3
parent 1513 e7f7e42385b5
permissions -rw-r--r--
IOS-1482 close branch
vb@1513
     1
// This file is under GNU General Public License 3.0
vb@1513
     2
// see LICENSE.txt
vb@1513
     3
vb@28
     4
#include "pEp_internal.h"
vb@46
     5
#include "trans_auto.h"
vb@23
     6
vb@23
     7
#include <memory.h>
vb@23
     8
#include <assert.h>
vb@23
     9
vb@259
    10
PEP_transport_t transports[PEP_trans__count];
vb@259
    11
    
vb@62
    12
PEP_STATUS init_transport_system(PEP_SESSION session, bool in_first)
vb@23
    13
{
vb@30
    14
    assert(session);
vb@62
    15
    session->transports = transports;
vb@30
    16
vb@62
    17
    if (in_first) {
vb@62
    18
        assert(PEP_trans__count == 1);
vb@62
    19
        memset(transports, 0, sizeof(PEP_transport_t) * PEP_trans__count);
vb@28
    20
vb@62
    21
        transports[PEP_trans_auto].id = PEP_trans_auto;
vb@62
    22
        transports[PEP_trans_auto].sendto = auto_sendto;
vb@62
    23
        transports[PEP_trans_auto].readnext = auto_readnext;
vb@62
    24
    }
vb@23
    25
vb@23
    26
    return PEP_STATUS_OK;
vb@23
    27
}
vb@28
    28
vb@125
    29
void release_transport_system(PEP_SESSION session, bool out_last)
vb@28
    30
{
vb@30
    31
    assert(session);
vb@28
    32
    // nothing yet
vb@28
    33
}
vb@29
    34