Changeset a4165561 in mainline


Ignore:
Timestamp:
2013-03-23T13:39:13Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d768d4c8
Parents:
71780e0
Message:

libhound: Implement context unregister, disallow stream drain.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/hound/src/protocol.c

    r71780e0 ra4165561  
    159159                ipc_call_t call;
    160160                ipc_callid_t callid = async_get_call(&call);
    161                 switch(IPC_GET_IMETHOD(call)) {
     161                switch (IPC_GET_IMETHOD(call)) {
    162162                case IPC_M_HOUND_CONTEXT_REGISTER: {
    163163                        if (!server_iface || !server_iface->add_context) {
     
    183183                        async_answer_1(callid, EOK, id);
    184184                }
     185                case IPC_M_HOUND_CONTEXT_UNREGISTER: {
     186                        if (!server_iface || !server_iface->rem_context) {
     187                                async_answer_0(callid, ENOTSUP);
     188                                break;
     189                        }
     190                        hound_context_id_t id = IPC_GET_ARG1(call);
     191                        const int ret =
     192                            server_iface->rem_context(server_iface->server, id);
     193                        async_answer_0(callid, ret);
     194                }
    185195                case IPC_M_HOUND_STREAM_ENTER: {
    186196                        if (!server_iface || !server_iface->add_stream) {
     
    203213                                break;
    204214                        }
     215                        //TODO consider record context
    205216                        hound_server_read_data(stream);
    206217                        break;
    207218                }
    208219                case IPC_M_HOUND_STREAM_EXIT:
    209                         /* Stream exit is only allowed in stream context */
     220                case IPC_M_HOUND_STREAM_DRAIN:
     221                        /* Stream exit/drain is only allowed in stream context*/
    210222                        async_answer_0(callid, EINVAL);
    211223                        break;
    212                 case IPC_M_HOUND_CONTEXT_UNREGISTER:
    213                 case IPC_M_HOUND_STREAM_DRAIN:
    214224                default:
    215225                        async_answer_0(callid, ENOTSUP);
Note: See TracChangeset for help on using the changeset viewer.