Changeset 1c6c3e1d in mainline for uspace/srv/hid/display/main.c


Ignore:
Timestamp:
2023-10-22T17:55:33Z (20 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
ticket/834-toolchain-update
Children:
350ec74
Parents:
315d487 (diff), 133461c (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.
Message:

Merge branch 'master' into ticket

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/main.c

    r315d487 r1c6c3e1d  
    127127        port_id_t wm_port;
    128128        port_id_t dc_port;
     129        loc_srv_t *srv = NULL;
     130        service_id_t sid = 0;
    129131        errno_t rc;
    130132
     
    171173                goto error;
    172174
    173         rc = loc_server_register(NAME);
     175        rc = loc_server_register(NAME, &srv);
    174176        if (rc != EOK) {
    175177                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server: %s.", str_error(rc));
     
    178180        }
    179181
    180         service_id_t sid;
    181         rc = loc_service_register(SERVICE_NAME_DISPLAY, &sid);
     182        rc = loc_service_register(srv, SERVICE_NAME_DISPLAY, &sid);
    182183        if (rc != EOK) {
    183184                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc));
     
    189190        return EOK;
    190191error:
     192        if (sid != 0)
     193                loc_service_unregister(srv, sid);
     194        if (srv != NULL)
     195                loc_server_unregister(srv);
    191196        // XXX destroy disp_port
    192197        // XXX destroy gc_port
Note: See TracChangeset for help on using the changeset viewer.