Changeset 4c6fd56 in mainline for uspace/app/terminal/terminal.c


Ignore:
Timestamp:
2023-09-16T19:58:18Z (9 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7d7f5e3
Parents:
6a0b2cc
git-author:
Jiri Svoboda <jiri@…> (2023-09-16 19:48:07)
git-committer:
Jiri Svoboda <jiri@…> (2023-09-16 19:58:18)
Message:

loc_server_register() should be callable more than once (API only)

Now loc_server_register() returns a pointer to a loc_srv_t object,
that is then passed to loc_service_register() and
loc_service_add_to_cat().

Added loc_server_unregister() that unregisters the server
and frees the loc_srv_t object.

Updated all callers. The implementation, however, is a stub.
It is not actually possible to call loc_server_register() more
than once, yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/terminal/terminal.c

    r6a0b2cc r4c6fd56  
    10221022        term->srvs.sarg = term;
    10231023
    1024         rc = loc_server_register(NAME);
     1024        rc = loc_server_register(NAME, &term->srv);
    10251025        if (rc != EOK) {
    10261026                printf("Error registering server.\n");
     
    10331033            task_get_id());
    10341034
    1035         rc = loc_service_register(vc, &term->dsid);
     1035        rc = loc_service_register(term->srv, vc, &term->dsid);
    10361036        if (rc != EOK) {
    10371037                printf("Error registering service.\n");
     
    10631063        return EOK;
    10641064error:
     1065        if (term->dsid != 0)
     1066                loc_service_unregister(term->srv, term->dsid);
     1067        if (term->srv != NULL)
     1068                loc_server_unregister(term->srv);
    10651069        if (term->window != NULL)
    10661070                ui_window_destroy(term->window);
Note: See TracChangeset for help on using the changeset viewer.