Changeset eb13ef8 in mainline for uspace/lib/c/generic/async/server.c
- Timestamp:
- 2019-02-06T13:25:12Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fafb8e5
- Parents:
- bb97118
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-02 14:04:02)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-06 13:25:12)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/server.c
rbb97118 reb13ef8 546 546 errno_t rc = mpsc_send(conn->msg_channel, call); 547 547 548 if (IPC_GET_IMETHOD( *call) == IPC_M_PHONE_HUNGUP) {548 if (IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) { 549 549 /* Close the channel, but let the connection fibril answer. */ 550 550 mpsc_close(conn->msg_channel); … … 657 657 658 658 ht_link_t *link = hash_table_find(¬ification_hash_table, 659 &IPC_GET_IMETHOD( *call));659 &IPC_GET_IMETHOD(call)); 660 660 if (!link) { 661 661 /* Invalid notification. */ … … 871 871 872 872 memset(call, 0, sizeof(ipc_call_t)); 873 IPC_SET_IMETHOD( *call, IPC_M_PHONE_HUNGUP);873 IPC_SET_IMETHOD(call, IPC_M_PHONE_HUNGUP); 874 874 call->cap_handle = CAP_NIL; 875 875 } … … 944 944 945 945 /* New connection */ 946 if (IPC_GET_IMETHOD( *call) == IPC_M_CONNECT_ME_TO) {946 if (IPC_GET_IMETHOD(call) == IPC_M_CONNECT_ME_TO) { 947 947 connection_t *conn = calloc(1, sizeof(*conn)); 948 948 if (!conn) { … … 951 951 } 952 952 953 iface_t iface = (iface_t) IPC_GET_ARG1( *call);953 iface_t iface = (iface_t) IPC_GET_ARG1(call); 954 954 955 955 // TODO: Currently ignores all ports but the first one. … … 1221 1221 async_get_call(call); 1222 1222 1223 if (IPC_GET_IMETHOD( *call) != IPC_M_SHARE_IN)1223 if (IPC_GET_IMETHOD(call) != IPC_M_SHARE_IN) 1224 1224 return false; 1225 1225 1226 *size = (size_t) IPC_GET_ARG1( *call);1226 *size = (size_t) IPC_GET_ARG1(call); 1227 1227 return true; 1228 1228 } … … 1276 1276 async_get_call(call); 1277 1277 1278 if (IPC_GET_IMETHOD( *call) != IPC_M_SHARE_OUT)1278 if (IPC_GET_IMETHOD(call) != IPC_M_SHARE_OUT) 1279 1279 return false; 1280 1280 1281 *size = (size_t) IPC_GET_ARG2( *call);1282 *flags = (unsigned int) IPC_GET_ARG3( *call);1281 *size = (size_t) IPC_GET_ARG2(call); 1282 *flags = (unsigned int) IPC_GET_ARG3(call); 1283 1283 return true; 1284 1284 } … … 1329 1329 async_get_call(call); 1330 1330 1331 if (IPC_GET_IMETHOD( *call) != IPC_M_DATA_READ)1331 if (IPC_GET_IMETHOD(call) != IPC_M_DATA_READ) 1332 1332 return false; 1333 1333 1334 1334 if (size) 1335 *size = (size_t) IPC_GET_ARG2( *call);1335 *size = (size_t) IPC_GET_ARG2(call); 1336 1336 1337 1337 return true; … … 1488 1488 async_get_call(call); 1489 1489 1490 if (IPC_GET_IMETHOD( *call) != IPC_M_DATA_WRITE)1490 if (IPC_GET_IMETHOD(call) != IPC_M_DATA_WRITE) 1491 1491 return false; 1492 1492 1493 1493 if (size) 1494 *size = (size_t) IPC_GET_ARG2( *call);1494 *size = (size_t) IPC_GET_ARG2(call); 1495 1495 1496 1496 return true; … … 1732 1732 async_get_call(&call); 1733 1733 1734 cap_phone_handle_t phandle = (cap_handle_t) IPC_GET_ARG5( call);1735 1736 if ((IPC_GET_IMETHOD( call) != IPC_M_CONNECT_TO_ME) ||1734 cap_phone_handle_t phandle = (cap_handle_t) IPC_GET_ARG5(&call); 1735 1736 if ((IPC_GET_IMETHOD(&call) != IPC_M_CONNECT_TO_ME) || 1737 1737 !cap_handle_valid((phandle))) { 1738 1738 async_answer_0(&call, EINVAL); … … 1776 1776 async_sess_t *async_callback_receive_start(exch_mgmt_t mgmt, ipc_call_t *call) 1777 1777 { 1778 cap_phone_handle_t phandle = (cap_handle_t) IPC_GET_ARG5( *call);1779 1780 if ((IPC_GET_IMETHOD( *call) != IPC_M_CONNECT_TO_ME) ||1778 cap_phone_handle_t phandle = (cap_handle_t) IPC_GET_ARG5(call); 1779 1780 if ((IPC_GET_IMETHOD(call) != IPC_M_CONNECT_TO_ME) || 1781 1781 !cap_handle_valid((phandle))) 1782 1782 return NULL; … … 1803 1803 async_get_call(call); 1804 1804 1805 if (IPC_GET_IMETHOD( *call) != IPC_M_STATE_CHANGE_AUTHORIZE)1805 if (IPC_GET_IMETHOD(call) != IPC_M_STATE_CHANGE_AUTHORIZE) 1806 1806 return false; 1807 1807
Note:
See TracChangeset
for help on using the changeset viewer.