Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0578271 in mainline for uspace/srv/net/tl/tcp/tcp_module.c


Ignore:
Timestamp:
2010-11-06T00:17:58Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
0b81cad0, 32efd86
Parents:
376a7fd
Message:

Get rid of the ERROR_CODE madness in tcp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/tcp/tcp_module.c

    r376a7fd r0578271  
    4444#include <async.h>
    4545#include <stdio.h>
    46 #include <err.h>
     46#include <errno.h>
    4747#include <ipc/ipc.h>
    4848#include <ipc/services.h>
     
    6161int tl_module_start_standalone(async_client_conn_t client_connection)
    6262{
    63         ERROR_DECLARE;
    64        
     63        ipcarg_t phonehash;
     64        int rc;
     65
    6566        async_set_client_connection(client_connection);
    6667        tcp_globals.net_phone = net_connect_module();
    67         ERROR_PROPAGATE(pm_init());
    68        
    69         ipcarg_t phonehash;
    70         if (ERROR_OCCURRED(tcp_initialize(client_connection)) ||
    71             ERROR_OCCURRED(REGISTER_ME(SERVICE_TCP, &phonehash))) {
    72                 pm_destroy();
    73                 return ERROR_CODE;
    74         }
     68
     69        rc = pm_init();
     70        if (rc != EOK)
     71                return rc;
     72
     73        rc = tcp_initialize(client_connection);
     74        if (rc != EOK)
     75                goto out;
     76
     77        rc = REGISTER_ME(SERVICE_TCP, &phonehash);
     78        if (rc != EOK)
     79                goto out;
    7580       
    7681        async_manager();
    7782       
     83out:
    7884        pm_destroy();
    79         return EOK;
     85        return rc;
    8086}
    8187
Note: See TracChangeset for help on using the changeset viewer.