Changeset 8565a42 in mainline for uspace/srv/net/loopip/loopip.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/loopip/loopip.c

    r3061bc1 r8565a42  
    7777typedef struct {
    7878        link_t link;
    79        
     79
    8080        /* XXX Version should be part of SDU */
    8181        ip_ver_t ver;
     
    9090                rqueue_entry_t *rqe =
    9191                    list_get_instance(link, rqueue_entry_t, link);
    92                
     92
    9393                (void) iplink_ev_recv(&loopip_iplink, &rqe->sdu, rqe->ver);
    94                
     94
    9595                free(rqe->sdu.data);
    9696                free(rqe);
    9797        }
    98        
     98
    9999        return 0;
    100100}
     
    103103{
    104104        async_set_fallback_port_handler(loopip_client_conn, NULL);
    105        
     105
    106106        errno_t rc = loc_server_register(NAME);
    107107        if (rc != EOK) {
     
    109109                return rc;
    110110        }
    111        
     111
    112112        iplink_srv_init(&loopip_iplink);
    113113        loopip_iplink.ops = &loopip_iplink_ops;
    114114        loopip_iplink.arg = NULL;
    115        
     115
    116116        prodcons_initialize(&loopip_rcv_queue);
    117        
     117
    118118        const char *svc_name = "net/loopback";
    119119        service_id_t sid;
     
    124124                return rc;
    125125        }
    126        
     126
    127127        category_id_t iplink_cat;
    128128        rc = loc_category_get_id("iplink", &iplink_cat, IPC_FLAG_BLOCKING);
     
    131131                return rc;
    132132        }
    133        
     133
    134134        rc = loc_service_add_to_cat(sid, iplink_cat);
    135135        if (rc != EOK) {
     
    138138                return rc;
    139139        }
    140        
     140
    141141        fid_t fid = fibril_create(loopip_recv_fibril, NULL);
    142142        if (fid == 0)
    143143                return ENOMEM;
    144        
     144
    145145        fibril_add_ready(fid);
    146        
     146
    147147        return EOK;
    148148}
     
    169169{
    170170        log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip_send()");
    171        
     171
    172172        rqueue_entry_t *rqe = calloc(1, sizeof(rqueue_entry_t));
    173173        if (rqe == NULL)
    174174                return ENOMEM;
    175        
     175
    176176        /*
    177177         * Clone SDU
     
    183183                return ENOMEM;
    184184        }
    185        
     185
    186186        memcpy(rqe->sdu.data, sdu->data, sdu->size);
    187187        rqe->sdu.size = sdu->size;
    188        
     188
    189189        /*
    190190         * Insert to receive queue
    191191         */
    192192        prodcons_produce(&loopip_rcv_queue, &rqe->link);
    193        
     193
    194194        return EOK;
    195195}
     
    198198{
    199199        log_msg(LOG_DEFAULT, LVL_DEBUG, "loopip6_send()");
    200        
     200
    201201        rqueue_entry_t *rqe = calloc(1, sizeof(rqueue_entry_t));
    202202        if (rqe == NULL)
    203203                return ENOMEM;
    204        
     204
    205205        /*
    206206         * Clone SDU
     
    212212                return ENOMEM;
    213213        }
    214        
     214
    215215        memcpy(rqe->sdu.data, sdu->data, sdu->size);
    216216        rqe->sdu.size = sdu->size;
    217        
     217
    218218        /*
    219219         * Insert to receive queue
    220220         */
    221221        prodcons_produce(&loopip_rcv_queue, &rqe->link);
    222        
     222
    223223        return EOK;
    224224}
     
    250250{
    251251        printf("%s: HelenOS loopback IP link provider\n", NAME);
    252        
     252
    253253        errno_t rc = log_init(NAME);
    254254        if (rc != EOK) {
     
    256256                return rc;
    257257        }
    258        
     258
    259259        rc = loopip_init();
    260260        if (rc != EOK) {
     
    262262                return rc;
    263263        }
    264        
     264
    265265        printf("%s: Accepting connections.\n", NAME);
    266266        task_retval(0);
    267267        async_manager();
    268        
     268
    269269        /* Not reached */
    270270        return 0;
Note: See TracChangeset for help on using the changeset viewer.