src/transport.c
author Roker <roker@pep-project.org>
Tue, 20 Sep 2016 15:54:57 +0200
branchroker-linux
changeset 1168 4d4e3ecbaf8b
parent 259 71d6c073fda4
child 1513 e7f7e42385b5
permissions -rw-r--r--
merge "default" into my branch
vb@28
     1
#include "pEp_internal.h"
vb@46
     2
#include "trans_auto.h"
vb@23
     3
vb@23
     4
#include <memory.h>
vb@23
     5
#include <assert.h>
vb@23
     6
vb@259
     7
PEP_transport_t transports[PEP_trans__count];
vb@259
     8
    
vb@62
     9
PEP_STATUS init_transport_system(PEP_SESSION session, bool in_first)
vb@23
    10
{
vb@30
    11
    assert(session);
vb@62
    12
    session->transports = transports;
vb@30
    13
vb@62
    14
    if (in_first) {
vb@62
    15
        assert(PEP_trans__count == 1);
vb@62
    16
        memset(transports, 0, sizeof(PEP_transport_t) * PEP_trans__count);
vb@28
    17
vb@62
    18
        transports[PEP_trans_auto].id = PEP_trans_auto;
vb@62
    19
        transports[PEP_trans_auto].sendto = auto_sendto;
vb@62
    20
        transports[PEP_trans_auto].readnext = auto_readnext;
vb@62
    21
    }
vb@23
    22
vb@23
    23
    return PEP_STATUS_OK;
vb@23
    24
}
vb@28
    25
vb@125
    26
void release_transport_system(PEP_SESSION session, bool out_last)
vb@28
    27
{
vb@30
    28
    assert(session);
vb@28
    29
    // nothing yet
vb@28
    30
}
vb@29
    31