Changeset a46e56b in mainline for uspace/srv/net/dhcp/main.c


Ignore:
Timestamp:
2018-03-22T06:49:35Z (7 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/dhcp/main.c

    r3e242d2 ra46e56b  
    8484}
    8585
    86 static void dhcp_link_add_srv(cap_call_handle_t callid, ipc_call_t *call)
     86static void dhcp_link_add_srv(cap_call_handle_t chandle, ipc_call_t *call)
    8787{
    8888        sysarg_t link_id;
     
    9494
    9595        rc = dhcpsrv_link_add(link_id);
    96         async_answer_0(callid, rc);
     96        async_answer_0(chandle, rc);
    9797}
    9898
    99 static void dhcp_link_remove_srv(cap_call_handle_t callid, ipc_call_t *call)
     99static void dhcp_link_remove_srv(cap_call_handle_t chandle, ipc_call_t *call)
    100100{
    101101        sysarg_t link_id;
     
    107107
    108108        rc = dhcpsrv_link_remove(link_id);
    109         async_answer_0(callid, rc);
     109        async_answer_0(chandle, rc);
    110110}
    111111
    112 static void dhcp_discover_srv(cap_call_handle_t callid, ipc_call_t *call)
     112static void dhcp_discover_srv(cap_call_handle_t chandle, ipc_call_t *call)
    113113{
    114114        sysarg_t link_id;
     
    120120
    121121        rc = dhcpsrv_discover(link_id);
    122         async_answer_0(callid, rc);
     122        async_answer_0(chandle, rc);
    123123}
    124124
    125 static void dhcp_client_conn(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     125static void dhcp_client_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    126126{
    127127        log_msg(LOG_DEFAULT, LVL_DEBUG, "dhcp_client_conn()");
    128128
    129129        /* Accept the connection */
    130         async_answer_0(iid, EOK);
     130        async_answer_0(icall_handle, EOK);
    131131
    132132        while (true) {
    133133                ipc_call_t call;
    134                 cap_call_handle_t callid = async_get_call(&call);
     134                cap_call_handle_t chandle = async_get_call(&call);
    135135                sysarg_t method = IPC_GET_IMETHOD(call);
    136136
    137137                if (!method) {
    138138                        /* The other side has hung up */
    139                         async_answer_0(callid, EOK);
     139                        async_answer_0(chandle, EOK);
    140140                        return;
    141141                }
     
    143143                switch (method) {
    144144                case DHCP_LINK_ADD:
    145                         dhcp_link_add_srv(callid, &call);
     145                        dhcp_link_add_srv(chandle, &call);
    146146                        break;
    147147                case DHCP_LINK_REMOVE:
    148                         dhcp_link_remove_srv(callid, &call);
     148                        dhcp_link_remove_srv(chandle, &call);
    149149                        break;
    150150                case DHCP_DISCOVER:
    151                         dhcp_discover_srv(callid, &call);
     151                        dhcp_discover_srv(chandle, &call);
    152152                        break;
    153153                default:
    154                         async_answer_0(callid, EINVAL);
     154                        async_answer_0(chandle, EINVAL);
    155155                }
    156156        }
Note: See TracChangeset for help on using the changeset viewer.