Changeset a46e56b in mainline for uspace/srv/net/ethip/ethip_nic.c


Ignore:
Timestamp:
2018-03-22T06:49:35Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77f0a1d
Parents:
3e242d2
git-author:
Jakub Jermar <jakub@…> (2018-03-21 23:29:06)
git-committer:
Jakub Jermar <jakub@…> (2018-03-22 06:49:35)
Message:

Prefer handle over ID in naming handle variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/ethip/ethip_nic.c

    r3e242d2 ra46e56b  
    5252
    5353static errno_t ethip_nic_open(service_id_t sid);
    54 static void ethip_nic_cb_conn(cap_call_handle_t iid, ipc_call_t *icall, void *arg);
     54static void ethip_nic_cb_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg);
    5555
    5656static LIST_INITIALIZE(ethip_nic_list);
     
    229229}
    230230
    231 static void ethip_nic_addr_changed(ethip_nic_t *nic, cap_call_handle_t callid,
     231static void ethip_nic_addr_changed(ethip_nic_t *nic, cap_call_handle_t chandle,
    232232    ipc_call_t *call)
    233233{
     
    255255
    256256        free(addr);
    257         async_answer_0(callid, EOK);
    258 }
    259 
    260 static void ethip_nic_received(ethip_nic_t *nic, cap_call_handle_t callid,
     257        async_answer_0(chandle, EOK);
     258}
     259
     260static void ethip_nic_received(ethip_nic_t *nic, cap_call_handle_t chandle,
    261261    ipc_call_t *call)
    262262{
     
    282282
    283283        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_received() done, rc=%s", str_error_name(rc));
    284         async_answer_0(callid, rc);
    285 }
    286 
    287 static void ethip_nic_device_state(ethip_nic_t *nic, cap_call_handle_t callid,
     284        async_answer_0(chandle, rc);
     285}
     286
     287static void ethip_nic_device_state(ethip_nic_t *nic, cap_call_handle_t chandle,
    288288    ipc_call_t *call)
    289289{
    290290        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_device_state()");
    291         async_answer_0(callid, ENOTSUP);
    292 }
    293 
    294 static void ethip_nic_cb_conn(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     291        async_answer_0(chandle, ENOTSUP);
     292}
     293
     294static void ethip_nic_cb_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    295295{
    296296        ethip_nic_t *nic = (ethip_nic_t *)arg;
     
    300300        while (true) {
    301301                ipc_call_t call;
    302                 cap_call_handle_t callid = async_get_call(&call);
     302                cap_call_handle_t chandle = async_get_call(&call);
    303303
    304304                if (!IPC_GET_IMETHOD(call)) {
     
    309309                switch (IPC_GET_IMETHOD(call)) {
    310310                case NIC_EV_ADDR_CHANGED:
    311                         ethip_nic_addr_changed(nic, callid, &call);
     311                        ethip_nic_addr_changed(nic, chandle, &call);
    312312                        break;
    313313                case NIC_EV_RECEIVED:
    314                         ethip_nic_received(nic, callid, &call);
     314                        ethip_nic_received(nic, chandle, &call);
    315315                        break;
    316316                case NIC_EV_DEVICE_STATE:
    317                         ethip_nic_device_state(nic, callid, &call);
     317                        ethip_nic_device_state(nic, chandle, &call);
    318318                        break;
    319319                default:
    320320                        log_msg(LOG_DEFAULT, LVL_DEBUG, "unknown IPC method: %" PRIun, IPC_GET_IMETHOD(call));
    321                         async_answer_0(callid, ENOTSUP);
     321                        async_answer_0(chandle, ENOTSUP);
    322322                }
    323323        }
Note: See TracChangeset for help on using the changeset viewer.