Index: uspace/srv/net/udp/service.c
===================================================================
--- uspace/srv/net/udp/service.c	(revision 3fafe5e03bb501f8627b315f8e97330dd3996f86)
+++ uspace/srv/net/udp/service.c	(revision 63d46341182c752620dcc5a2233d205cee1075dd)
@@ -326,11 +326,9 @@
  * Handle client request to create callback session.
  *
- * @param client        UDP client
- * @param icall_handle  Async request call handle
- * @param icall         Async request data
- */
-static void
-udp_callback_create_srv(udp_client_t *client, cap_call_handle_t icall_handle,
-    ipc_call_t *icall)
+ * @param client UDP client
+ * @param icall  Async request data
+ *
+ */
+static void udp_callback_create_srv(udp_client_t *client, ipc_call_t *icall)
 {
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_callback_create_srv()");
@@ -338,10 +336,10 @@
 	async_sess_t *sess = async_callback_receive(EXCHANGE_SERIALIZE);
 	if (sess == NULL) {
-		async_answer_0(icall_handle, ENOMEM);
+		async_answer_0(icall, ENOMEM);
 		return;
 	}
 
 	client->sess = sess;
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 }
 
@@ -350,13 +348,11 @@
  * Handle client request to create association.
  *
- * @param client        UDP client
- * @param icall_handle  Async request call handle
- * @param icall         Async request data
- */
-static void
-udp_assoc_create_srv(udp_client_t *client, cap_call_handle_t icall_handle,
-    ipc_call_t *icall)
-{
-	cap_call_handle_t chandle;
+ * @param client UDP client
+ * @param icall  Async request data
+ *
+ */
+static void udp_assoc_create_srv(udp_client_t *client, ipc_call_t *icall)
+{
+	ipc_call_t call;
 	size_t size;
 	inet_ep2_t epp;
@@ -366,20 +362,20 @@
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_create_srv()");
 
-	if (!async_data_write_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+	if (!async_data_write_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
 
 	if (size != sizeof(inet_ep2_t)) {
-		async_answer_0(chandle, EINVAL);
-		async_answer_0(icall_handle, EINVAL);
-		return;
-	}
-
-	rc = async_data_write_finalize(chandle, &epp, size);
-	if (rc != EOK) {
-		async_answer_0(chandle, rc);
-		async_answer_0(icall_handle, rc);
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	rc = async_data_write_finalize(&call, &epp, size);
+	if (rc != EOK) {
+		async_answer_0(&call, rc);
+		async_answer_0(icall, rc);
 		return;
 	}
@@ -387,9 +383,9 @@
 	rc = udp_assoc_create_impl(client, &epp, &assoc_id);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	async_answer_1(icall_handle, EOK, assoc_id);
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	async_answer_1(icall, EOK, assoc_id);
 }
 
@@ -398,11 +394,9 @@
  * Handle client request to destroy association.
  *
- * @param client        UDP client
- * @param icall_handle  Async request call handle
- * @param icall         Async request data
- */
-static void
-udp_assoc_destroy_srv(udp_client_t *client, cap_call_handle_t icall_handle,
-    ipc_call_t *icall)
+ * @param client UDP client
+ * @param icall  Async request data
+ *
+ */
+static void udp_assoc_destroy_srv(udp_client_t *client, ipc_call_t *icall)
 {
 	sysarg_t assoc_id;
@@ -413,5 +407,5 @@
 	assoc_id = IPC_GET_ARG1(*icall);
 	rc = udp_assoc_destroy_impl(client, assoc_id);
-	async_answer_0(icall_handle, rc);
+	async_answer_0(icall, rc);
 }
 
@@ -420,11 +414,9 @@
  * Handle client request to set no local address flag.
  *
- * @param client        UDP client
- * @param icall_handle  Async request call handle
- * @param icall         Async request data
- */
-static void
-udp_assoc_set_nolocal_srv(udp_client_t *client, cap_call_handle_t icall_handle,
-    ipc_call_t *icall)
+ * @param client UDP client
+ * @param icall  Async request data
+ *
+ */
+static void udp_assoc_set_nolocal_srv(udp_client_t *client, ipc_call_t *icall)
 {
 	sysarg_t assoc_id;
@@ -435,5 +427,5 @@
 	assoc_id = IPC_GET_ARG1(*icall);
 	rc = udp_assoc_set_nolocal_impl(client, assoc_id);
-	async_answer_0(icall_handle, rc);
+	async_answer_0(icall, rc);
 }
 
@@ -442,13 +434,11 @@
  * Handle client request to send message.
  *
- * @param client        UDP client
- * @param icall_handle  Async request call handle
- * @param icall         Async request data
- */
-static void
-udp_assoc_send_msg_srv(udp_client_t *client, cap_call_handle_t icall_handle,
-    ipc_call_t *icall)
-{
-	cap_call_handle_t chandle;
+ * @param client UDP client
+ * @param icall  Async request data
+ *
+ */
+static void udp_assoc_send_msg_srv(udp_client_t *client, ipc_call_t *icall)
+{
+	ipc_call_t call;
 	size_t size;
 	inet_ep_t dest;
@@ -461,20 +451,20 @@
 	/* Receive dest */
 
-	if (!async_data_write_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+	if (!async_data_write_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
 
 	if (size != sizeof(inet_ep_t)) {
-		async_answer_0(chandle, EINVAL);
-		async_answer_0(icall_handle, EINVAL);
-		return;
-	}
-
-	rc = async_data_write_finalize(chandle, &dest, size);
-	if (rc != EOK) {
-		async_answer_0(chandle, rc);
-		async_answer_0(icall_handle, rc);
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	rc = async_data_write_finalize(&call, &dest, size);
+	if (rc != EOK) {
+		async_answer_0(&call, rc);
+		async_answer_0(icall, rc);
 		return;
 	}
@@ -482,13 +472,13 @@
 	/* Receive message data */
 
-	if (!async_data_write_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+	if (!async_data_write_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
 
 	if (size > MAX_MSG_SIZE) {
-		async_answer_0(chandle, EINVAL);
-		async_answer_0(icall_handle, EINVAL);
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
 		return;
 	}
@@ -496,12 +486,12 @@
 	data = malloc(size);
 	if (data == NULL) {
-		async_answer_0(chandle, ENOMEM);
-		async_answer_0(icall_handle, ENOMEM);
-	}
-
-	rc = async_data_write_finalize(chandle, data, size);
-	if (rc != EOK) {
-		async_answer_0(chandle, rc);
-		async_answer_0(icall_handle, rc);
+		async_answer_0(&call, ENOMEM);
+		async_answer_0(icall, ENOMEM);
+	}
+
+	rc = async_data_write_finalize(&call, data, size);
+	if (rc != EOK) {
+		async_answer_0(&call, rc);
+		async_answer_0(icall, rc);
 		free(data);
 		return;
@@ -512,10 +502,10 @@
 	rc = udp_assoc_send_msg_impl(client, assoc_id, &dest, data, size);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, rc);
+		async_answer_0(icall, rc);
 		free(data);
 		return;
 	}
 
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 	free(data);
 }
@@ -541,13 +531,11 @@
  * Handle client request to get information on received message.
  *
- * @param client        UDP client
- * @param icall_handle  Async request call handle
- * @param icall         Async request data
- */
-static void
-udp_rmsg_info_srv(udp_client_t *client, cap_call_handle_t icall_handle,
-    ipc_call_t *icall)
-{
-	cap_call_handle_t chandle;
+ * @param client UDP client
+ * @param icall  Async request data
+ *
+ */
+static void udp_rmsg_info_srv(udp_client_t *client, ipc_call_t *icall)
+{
+	ipc_call_t call;
 	size_t size;
 	udp_crcv_queue_entry_t *enext;
@@ -558,20 +546,20 @@
 	enext = udp_rmsg_get_next(client);
 
-	if (!async_data_read_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+	if (!async_data_read_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
 
 	if (enext == NULL) {
-		async_answer_0(chandle, ENOENT);
-		async_answer_0(icall_handle, ENOENT);
-		return;
-	}
-
-	rc = async_data_read_finalize(chandle, &enext->epp.remote,
+		async_answer_0(&call, ENOENT);
+		async_answer_0(icall, ENOENT);
+		return;
+	}
+
+	rc = async_data_read_finalize(&call, &enext->epp.remote,
 	    max(size, (size_t)sizeof(inet_ep_t)));
 	if (rc != EOK) {
-		async_answer_0(icall_handle, rc);
+		async_answer_0(icall, rc);
 		return;
 	}
@@ -582,5 +570,5 @@
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_rmsg_info_srv(): assoc_id=%zu, "
 	    "size=%zu", assoc_id, size);
-	async_answer_2(icall_handle, EOK, assoc_id, size);
+	async_answer_2(icall, EOK, assoc_id, size);
 }
 
@@ -589,13 +577,11 @@
  * Handle client request to read data from first received message.
  *
- * @param client        UDP client
- * @param icall_handle  Async request call handle
- * @param icall         Async request data
- */
-static void
-udp_rmsg_read_srv(udp_client_t *client, cap_call_handle_t icall_handle,
-    ipc_call_t *icall)
-{
-	cap_call_handle_t chandle;
+ * @param client UDP client
+ * @param icall  Async request data
+ *
+ */
+static void udp_rmsg_read_srv(udp_client_t *client, ipc_call_t *icall)
+{
+	ipc_call_t call;
 	size_t msg_size;
 	udp_crcv_queue_entry_t *enext;
@@ -610,13 +596,13 @@
 	enext = udp_rmsg_get_next(client);
 
-	if (!async_data_read_receive(&chandle, &size)) {
-		async_answer_0(chandle, EREFUSED);
-		async_answer_0(icall_handle, EREFUSED);
+	if (!async_data_read_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
 		return;
 	}
 
 	if (enext == NULL) {
-		async_answer_0(chandle, ENOENT);
-		async_answer_0(icall_handle, ENOENT);
+		async_answer_0(&call, ENOENT);
+		async_answer_0(icall, ENOENT);
 		return;
 	}
@@ -626,16 +612,16 @@
 
 	if (off > msg_size) {
-		async_answer_0(chandle, EINVAL);
-		async_answer_0(icall_handle, EINVAL);
-		return;
-	}
-
-	rc = async_data_read_finalize(chandle, data, min(msg_size - off, size));
-	if (rc != EOK) {
-		async_answer_0(icall_handle, rc);
-		return;
-	}
-
-	async_answer_0(icall_handle, EOK);
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	rc = async_data_read_finalize(&call, data, min(msg_size - off, size));
+	if (rc != EOK) {
+		async_answer_0(icall, rc);
+		return;
+	}
+
+	async_answer_0(icall, EOK);
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_rmsg_read_srv(): OK");
 }
@@ -646,11 +632,9 @@
  * to the next one.
  *
- * @param client        UDP client
- * @param icall_handle  Async request call handle
- * @param icall         Async request data
- */
-static void
-udp_rmsg_discard_srv(udp_client_t *client, cap_call_handle_t icall_handle,
-    ipc_call_t *icall)
+ * @param client UDP client
+ * @param icall  Async request data
+ *
+ */
+static void udp_rmsg_discard_srv(udp_client_t *client, ipc_call_t *icall)
 {
 	udp_crcv_queue_entry_t *enext;
@@ -661,5 +645,5 @@
 	if (enext == NULL) {
 		log_msg(LOG_DEFAULT, LVL_DEBUG, "usg_rmsg_discard_srv: enext==NULL");
-		async_answer_0(icall_handle, ENOENT);
+		async_answer_0(icall, ENOENT);
 		return;
 	}
@@ -668,15 +652,14 @@
 	udp_msg_delete(enext->msg);
 	free(enext);
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 }
 
 /** Handle UDP client connection.
  *
- * @param icall_handle  Connect call handle
- * @param icall         Connect call data
- * @param arg           Connection argument
- */
-static void udp_client_conn(cap_call_handle_t icall_handle, ipc_call_t *icall,
-    void *arg)
+ * @param icall Connect call data
+ * @param arg   Connection argument
+ *
+ */
+static void udp_client_conn(ipc_call_t *icall, void *arg)
 {
 	udp_client_t client;
@@ -684,5 +667,5 @@
 
 	/* Accept the connection */
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_client_conn()");
@@ -695,5 +678,5 @@
 		log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_client_conn: wait req");
 		ipc_call_t call;
-		cap_call_handle_t chandle = async_get_call(&call);
+		async_get_call(&call);
 		sysarg_t method = IPC_GET_IMETHOD(call);
 
@@ -702,5 +685,5 @@
 		if (!method) {
 			/* The other side has hung up */
-			async_answer_0(chandle, EOK);
+			async_answer_0(&call, EOK);
 			break;
 		}
@@ -708,29 +691,29 @@
 		switch (method) {
 		case UDP_CALLBACK_CREATE:
-			udp_callback_create_srv(&client, chandle, &call);
+			udp_callback_create_srv(&client, &call);
 			break;
 		case UDP_ASSOC_CREATE:
-			udp_assoc_create_srv(&client, chandle, &call);
+			udp_assoc_create_srv(&client, &call);
 			break;
 		case UDP_ASSOC_DESTROY:
-			udp_assoc_destroy_srv(&client, chandle, &call);
+			udp_assoc_destroy_srv(&client, &call);
 			break;
 		case UDP_ASSOC_SET_NOLOCAL:
-			udp_assoc_set_nolocal_srv(&client, chandle, &call);
+			udp_assoc_set_nolocal_srv(&client, &call);
 			break;
 		case UDP_ASSOC_SEND_MSG:
-			udp_assoc_send_msg_srv(&client, chandle, &call);
+			udp_assoc_send_msg_srv(&client, &call);
 			break;
 		case UDP_RMSG_INFO:
-			udp_rmsg_info_srv(&client, chandle, &call);
+			udp_rmsg_info_srv(&client, &call);
 			break;
 		case UDP_RMSG_READ:
-			udp_rmsg_read_srv(&client, chandle, &call);
+			udp_rmsg_read_srv(&client, &call);
 			break;
 		case UDP_RMSG_DISCARD:
-			udp_rmsg_discard_srv(&client, chandle, &call);
+			udp_rmsg_discard_srv(&client, &call);
 			break;
 		default:
-			async_answer_0(chandle, ENOTSUP);
+			async_answer_0(&call, ENOTSUP);
 			break;
 		}
