Ignore:
File:
1 edited

Legend:

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

    rca48672 rb4edc96  
    11/*
    2  * Copyright (c) 2025 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * Copyright (c) 2013 Jakub Jermar
    44 * All rights reserved.
     
    307307        chardev_t *chardev_out = NULL;
    308308        fid_t fid;
    309         loc_srv_t *srv;
    310309        errno_t rc;
    311310
     
    315314        async_set_fallback_port_handler(slip_client_conn, NULL);
    316315
    317         rc = loc_server_register(NAME, &srv);
     316        rc = loc_server_register(NAME);
    318317        if (rc != EOK) {
    319318                log_msg(LOG_DEFAULT, LVL_ERROR,
     
    324323        rc = loc_service_get_id(svcstr, &svcid, 0);
    325324        if (rc != EOK) {
    326                 loc_server_unregister(srv);
    327325                log_msg(LOG_DEFAULT, LVL_ERROR,
    328326                    "Failed getting ID for service %s", svcstr);
     
    332330        rc = loc_category_get_id(CAT_IPLINK, &iplinkcid, 0);
    333331        if (rc != EOK) {
    334                 loc_server_unregister(srv);
    335332                log_msg(LOG_DEFAULT, LVL_ERROR,
    336333                    "Failed to get category ID for %s",
     
    345342        sess_out = loc_service_connect(svcid, INTERFACE_DDF, 0);
    346343        if (!sess_out) {
    347                 loc_server_unregister(srv);
    348344                log_msg(LOG_DEFAULT, LVL_ERROR,
    349345                    "Failed to connect to service %s (ID=%d)",
     
    354350        rc = chardev_open(sess_out, &chardev_out);
    355351        if (rc != EOK) {
    356                 loc_server_unregister(srv);
    357352                log_msg(LOG_DEFAULT, LVL_ERROR,
    358353                    "Failed opening character device.");
     
    378373        }
    379374
    380         rc = loc_service_register(srv, linkstr, fallback_port_id, &linksid);
     375        rc = loc_service_register(linkstr, &linksid);
    381376        if (rc != EOK) {
    382377                log_msg(LOG_DEFAULT, LVL_ERROR,
     
    386381        }
    387382
    388         rc = loc_service_add_to_cat(srv, linksid, iplinkcid);
    389         if (rc != EOK) {
    390                 loc_service_unregister(srv, linksid);
     383        rc = loc_service_add_to_cat(linksid, iplinkcid);
     384        if (rc != EOK) {
    391385                log_msg(LOG_DEFAULT, LVL_ERROR,
    392386                    "Failed to add service %d (%s) to category %d (%s).",
     
    407401
    408402fail:
    409         loc_server_unregister(srv);
    410403        chardev_close(chardev_out);
    411404        if (sess_out)
Note: See TracChangeset for help on using the changeset viewer.