Changeset 4c6fd56 in mainline for uspace/app/display-cfg/test/seats.c


Ignore:
Timestamp:
2023-09-16T19:58:18Z (16 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/display-cfg/test/seats.c

    r6a0b2cc r4c6fd56  
    9494        service_id_t sid;
    9595        test_response_t resp;
     96        loc_srv_t *srv;
    9697
    9798        async_set_fallback_port_handler(test_dispcfg_conn, &resp);
    9899
    99100        // FIXME This causes this test to be non-reentrant!
    100         rc = loc_server_register(test_dispcfg_server);
    101         PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    102 
    103         rc = loc_service_register(test_dispcfg_svc, &sid);
     101        rc = loc_server_register(test_dispcfg_server, &srv);
     102        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     103
     104        rc = loc_service_register(srv, test_dispcfg_svc, &sid);
    104105        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    105106
     
    135136        dcfg_seats_destroy(seats);
    136137        display_cfg_destroy(dcfg);
     138
     139        rc = loc_service_unregister(srv, sid);
     140        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     141        loc_server_unregister(srv);
    137142}
    138143
Note: See TracChangeset for help on using the changeset viewer.