Changeset 474afc9 in mainline for uspace/lib/usbvirt/src/callback.c


Ignore:
Timestamp:
2011-02-04T22:40:13Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4d73d71
Parents:
89acf204 (diff), e29e09cf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

development branch changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbvirt/src/callback.c

    r89acf204 r474afc9  
    5454       
    5555        if (address != device->address) {
    56                 ipc_answer_0(iid, EADDRNOTAVAIL);
     56                async_answer_0(iid, EADDRNOTAVAIL);
    5757                return;
    5858        }
    5959       
    6060        if ((endpoint < 0) || (endpoint >= USB11_ENDPOINT_MAX)) {
    61                 ipc_answer_0(iid, EINVAL);
     61                async_answer_0(iid, EINVAL);
    6262                return;
    6363        }
    6464       
    6565        if (expected_len == 0) {
    66                 ipc_answer_0(iid, EINVAL);
     66                async_answer_0(iid, EINVAL);
    6767                return;
    6868        }
     
    7474               
    7575        if (rc != EOK) {
    76                 ipc_answer_0(iid, rc);
     76                async_answer_0(iid, rc);
    7777                return;
    7878        }
     
    8080        rc = device->transaction_setup(device, endpoint, buffer, len);
    8181       
    82         ipc_answer_0(iid, rc);
     82        async_answer_0(iid, rc);
    8383}
    8484
     
    9292       
    9393        if (address != device->address) {
    94                 ipc_answer_0(iid, EADDRNOTAVAIL);
     94                async_answer_0(iid, EADDRNOTAVAIL);
    9595                return;
    9696        }
    9797       
    9898        if ((endpoint < 0) || (endpoint >= USB11_ENDPOINT_MAX)) {
    99                 ipc_answer_0(iid, EINVAL);
     99                async_answer_0(iid, EINVAL);
    100100                return;
    101101        }
     
    111111                       
    112112                if (rc != EOK) {
    113                         ipc_answer_0(iid, rc);
     113                        async_answer_0(iid, rc);
    114114                        return;
    115115                }
     
    122122        }
    123123       
    124         ipc_answer_0(iid, rc);
     124        async_answer_0(iid, rc);
    125125}
    126126
     
    135135       
    136136        if (address != device->address) {
    137                 ipc_answer_0(iid, EADDRNOTAVAIL);
     137                async_answer_0(iid, EADDRNOTAVAIL);
    138138                return;
    139139        }
    140140       
    141141        if ((endpoint < 0) || (endpoint >= USB11_ENDPOINT_MAX)) {
    142                 ipc_answer_0(iid, EINVAL);
     142                async_answer_0(iid, EINVAL);
    143143                return;
    144144        }
     
    157157                ipc_callid_t callid;
    158158                if (!async_data_read_receive(&callid, &receive_len)) {
    159                         ipc_answer_0(iid, EINVAL);
     159                        async_answer_0(iid, EINVAL);
    160160                        return;
    161161                }
     
    166166        }
    167167       
    168         ipc_answer_1(iid, rc, len);
     168        async_answer_1(iid, rc, len);
    169169}
    170170
     
    174174{
    175175        if (device->name == NULL) {
    176                 ipc_answer_0(iid, ENOENT);
     176                async_answer_0(iid, ENOENT);
    177177        }
    178178       
     
    182182        size_t accepted_size;
    183183        if (!async_data_read_receive(&callid, &accepted_size)) {
    184                 ipc_answer_0(iid, EINVAL);
     184                async_answer_0(iid, EINVAL);
    185185                return;
    186186        }
     
    191191        async_data_read_finalize(callid, device->name, accepted_size);
    192192       
    193         ipc_answer_1(iid, EOK, accepted_size);
     193        async_answer_1(iid, EOK, accepted_size);
    194194}
    195195
     
    197197void device_callback_connection(usbvirt_device_t *device, ipc_callid_t iid, ipc_call_t *icall)
    198198{
    199         ipc_answer_0(iid, EOK);
     199        async_answer_0(iid, EOK);
    200200       
    201201        while (true) {
     
    206206                switch (IPC_GET_IMETHOD(call)) {
    207207                        case IPC_M_PHONE_HUNGUP:
    208                                 ipc_answer_0(callid, EOK);
     208                                async_answer_0(callid, EOK);
    209209                                return;
    210210                       
     
    226226                       
    227227                        default:
    228                                 ipc_answer_0(callid, EINVAL);
     228                                async_answer_0(callid, EINVAL);
    229229                                break;
    230230                }
Note: See TracChangeset for help on using the changeset viewer.