Changeset e6e5f4e in mainline for uspace/lib/hound/src/protocol.c


Ignore:
Timestamp:
2013-03-24T16:35:07Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6ec1d48
Parents:
2ba4d45
Message:

libhound: Fix context registration.

File:
1 edited

Legend:

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

    r2ba4d45 re6e5f4e  
    8484        assert(sess);
    8585        assert(name);
     86        ipc_call_t call;
    8687        async_exch_t *exch = async_exchange_begin(sess);
    87         sysarg_t id;
    88         int ret =
    89             async_req_1_1(exch, IPC_M_HOUND_CONTEXT_REGISTER, record, &id);
     88        aid_t mid =
     89            async_send_1(exch, IPC_M_HOUND_CONTEXT_REGISTER, record, &call);
     90        int ret = mid ? EOK : EPARTY;
     91
    9092        if (ret == EOK)
    9193                ret = async_data_write_start(exch, name, str_size(name));
     94        else
     95                async_forget(mid);
     96
     97        if (ret == EOK)
     98                async_wait_for(mid, (sysarg_t *)&ret);
     99
    92100        async_exchange_end(exch);
    93         return ret == EOK ? (hound_context_id_t)id : ret;
     101        return ret == EOK ? (hound_context_id_t)IPC_GET_ARG1(call) : ret;
    94102}
    95103
     
    244252static const hound_server_iface_t *server_iface;
    245253
    246 void hound_service_set_server_iface(hound_server_iface_t *iface)
     254void hound_service_set_server_iface(const hound_server_iface_t *iface)
    247255{
    248256        server_iface = iface;
     
    282290                                free(name);
    283291                                async_answer_0(callid, ret);
    284                                 break;
    285                         }
    286                         async_answer_1(callid, EOK, id);
     292                        } else {
     293                                async_answer_1(callid, EOK, id);
     294                        }
     295                        break;
    287296                }
    288297                case IPC_M_HOUND_CONTEXT_UNREGISTER: {
Note: See TracChangeset for help on using the changeset viewer.