Index: uspace/lib/c/generic/inet/tcp.c
===================================================================
--- uspace/lib/c/generic/inet/tcp.c	(revision b752a317bb5dfb454cb227f59a1be5d52d10947d)
+++ uspace/lib/c/generic/inet/tcp.c	(revision bd9e868109273fe333c36fad00976f58740dbb8b)
@@ -41,5 +41,5 @@
 #include <stdlib.h>
 
-static void tcp_cb_conn(cap_call_handle_t, ipc_call_t *, void *);
+static void tcp_cb_conn(ipc_call_t *, void *);
 static errno_t tcp_conn_fibril(void *);
 
@@ -633,10 +633,9 @@
 /** Connection established event.
  *
- * @param tcp           TCP client
- * @param icall_handle  Call handle
- * @param icall         Call data
- */
-static void
-tcp_ev_connected(tcp_t *tcp, cap_call_handle_t icall_handle, ipc_call_t *icall)
+ * @param tcp   TCP client
+ * @param icall Call data
+ *
+ */
+static void tcp_ev_connected(tcp_t *tcp, ipc_call_t *icall)
 {
 	tcp_conn_t *conn;
@@ -648,5 +647,5 @@
 	rc = tcp_conn_get(tcp, conn_id, &conn);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, ENOENT);
+		async_answer_0(icall, ENOENT);
 		return;
 	}
@@ -657,16 +656,14 @@
 	fibril_mutex_unlock(&conn->lock);
 
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 }
 
 /** Connection failed event.
  *
- * @param tcp           TCP client
- * @param icall_handle  Call handle
- * @param icall         Call data
- */
-static void
-tcp_ev_conn_failed(tcp_t *tcp, cap_call_handle_t icall_handle,
-    ipc_call_t *icall)
+ * @param tcp   TCP client
+ * @param icall Call data
+ *
+ */
+static void tcp_ev_conn_failed(tcp_t *tcp, ipc_call_t *icall)
 {
 	tcp_conn_t *conn;
@@ -678,5 +675,5 @@
 	rc = tcp_conn_get(tcp, conn_id, &conn);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, ENOENT);
+		async_answer_0(icall, ENOENT);
 		return;
 	}
@@ -687,14 +684,14 @@
 	fibril_mutex_unlock(&conn->lock);
 
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 }
 
 /** Connection reset event.
  *
- * @param tcp           TCP client
- * @param icall_handle  Call handle
- * @param icall         Call data
- */
-static void tcp_ev_conn_reset(tcp_t *tcp, cap_call_handle_t icall_handle, ipc_call_t *icall)
+ * @param tcp   TCP client
+ * @param icall Call data
+ *
+ */
+static void tcp_ev_conn_reset(tcp_t *tcp, ipc_call_t *icall)
 {
 	tcp_conn_t *conn;
@@ -706,5 +703,5 @@
 	rc = tcp_conn_get(tcp, conn_id, &conn);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, ENOENT);
+		async_answer_0(icall, ENOENT);
 		return;
 	}
@@ -715,15 +712,14 @@
 	fibril_mutex_unlock(&conn->lock);
 
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 }
 
 /** Data available event.
  *
- * @param tcp           TCP client
- * @param icall_handle  Call handle
- * @param icall         Call data
- */
-static void
-tcp_ev_data(tcp_t *tcp, cap_call_handle_t icall_handle, ipc_call_t *icall)
+ * @param tcp   TCP client
+ * @param icall Call data
+ *
+ */
+static void tcp_ev_data(tcp_t *tcp, ipc_call_t *icall)
 {
 	tcp_conn_t *conn;
@@ -735,5 +731,5 @@
 	rc = tcp_conn_get(tcp, conn_id, &conn);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, ENOENT);
+		async_answer_0(icall, ENOENT);
 		return;
 	}
@@ -745,27 +741,25 @@
 		conn->cb->data_avail(conn);
 
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 }
 
 /** Urgent data event.
  *
- * @param tcp           TCP client
- * @param icall_handle  Call handle
- * @param icall         Call data
- */
-static void
-tcp_ev_urg_data(tcp_t *tcp, cap_call_handle_t icall_handle, ipc_call_t *icall)
-{
-	async_answer_0(icall_handle, ENOTSUP);
+ * @param tcp   TCP client
+ * @param icall Call data
+ *
+ */
+static void tcp_ev_urg_data(tcp_t *tcp, ipc_call_t *icall)
+{
+	async_answer_0(icall, ENOTSUP);
 }
 
 /** New connection event.
  *
- * @param tcp           TCP client
- * @param icall_handle  Call handle
- * @param icall         Call data
- */
-static void
-tcp_ev_new_conn(tcp_t *tcp, cap_call_handle_t icall_handle, ipc_call_t *icall)
+ * @param tcp   TCP client
+ * @param icall Call data
+ *
+ */
+static void tcp_ev_new_conn(tcp_t *tcp, ipc_call_t *icall)
 {
 	tcp_listener_t *lst;
@@ -782,5 +776,5 @@
 	rc = tcp_listener_get(tcp, lst_id, &lst);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, ENOENT);
+		async_answer_0(icall, ENOENT);
 		return;
 	}
@@ -788,5 +782,5 @@
 	rc = tcp_conn_new(tcp, conn_id, lst->cb, lst->cb_arg, &conn);
 	if (rc != EOK) {
-		async_answer_0(icall_handle, ENOMEM);
+		async_answer_0(icall, ENOMEM);
 		return;
 	}
@@ -795,5 +789,5 @@
 		cinfo = calloc(1, sizeof(tcp_in_conn_t));
 		if (cinfo == NULL) {
-			async_answer_0(icall_handle, ENOMEM);
+			async_answer_0(icall, ENOMEM);
 			return;
 		}
@@ -804,5 +798,5 @@
 		fid = fibril_create(tcp_conn_fibril, cinfo);
 		if (fid == 0) {
-			async_answer_0(icall_handle, ENOMEM);
+			async_answer_0(icall, ENOMEM);
 		}
 
@@ -810,23 +804,22 @@
 	}
 
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 }
 
 /** Callback connection handler.
  *
- * @param icall_handle  Connect call handle
- * @param icall         Connect call data
- * @param arg           Argument, TCP client
- */
-static void
-tcp_cb_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
+ * @param icall Connect call data
+ * @param arg   Argument, TCP client
+ *
+ */
+static void tcp_cb_conn(ipc_call_t *icall, void *arg)
 {
 	tcp_t *tcp = (tcp_t *)arg;
 
-	async_answer_0(icall_handle, EOK);
+	async_answer_0(icall, EOK);
 
 	while (true) {
 		ipc_call_t call;
-		cap_call_handle_t chandle = async_get_call(&call);
+		async_get_call(&call);
 
 		if (!IPC_GET_IMETHOD(call)) {
@@ -837,26 +830,27 @@
 		switch (IPC_GET_IMETHOD(call)) {
 		case TCP_EV_CONNECTED:
-			tcp_ev_connected(tcp, chandle, &call);
+			tcp_ev_connected(tcp, &call);
 			break;
 		case TCP_EV_CONN_FAILED:
-			tcp_ev_conn_failed(tcp, chandle, &call);
+			tcp_ev_conn_failed(tcp, &call);
 			break;
 		case TCP_EV_CONN_RESET:
-			tcp_ev_conn_reset(tcp, chandle, &call);
+			tcp_ev_conn_reset(tcp, &call);
 			break;
 		case TCP_EV_DATA:
-			tcp_ev_data(tcp, chandle, &call);
+			tcp_ev_data(tcp, &call);
 			break;
 		case TCP_EV_URG_DATA:
-			tcp_ev_urg_data(tcp, chandle, &call);
+			tcp_ev_urg_data(tcp, &call);
 			break;
 		case TCP_EV_NEW_CONN:
-			tcp_ev_new_conn(tcp, chandle, &call);
+			tcp_ev_new_conn(tcp, &call);
 			break;
 		default:
-			async_answer_0(chandle, ENOTSUP);
+			async_answer_0(&call, ENOTSUP);
 			break;
 		}
 	}
+
 out:
 	fibril_mutex_lock(&tcp->lock);
