Index: generic/src/ipc/ipc.c
===================================================================
--- generic/src/ipc/ipc.c	(revision eb3d3796fe70e08b188cec351b1979d97243c33f)
+++ generic/src/ipc/ipc.c	(revision 2cb5e6478ff8e1d5cf947da6398d6e2d496c27e4)
@@ -111,10 +111,9 @@
 	spinlock_lock(&phone->lock);
 
-	ASSERT(!phone->callee);
 	phone->state = IPC_PHONE_CONNECTED;
 	phone->callee = box;
 
 	spinlock_lock(&box->lock);
-	list_append(&phone->list, &box->connected_phones);
+	list_append(&phone->link, &box->connected_phones);
 	spinlock_unlock(&box->lock);
 
@@ -156,5 +155,5 @@
 
 	spinlock_lock(&callerbox->lock);
-	list_append(&call->list, &callerbox->answers);
+	list_append(&call->link, &callerbox->answers);
 	spinlock_unlock(&callerbox->lock);
 	waitq_wakeup(&callerbox->wq, 0);
@@ -170,5 +169,5 @@
 	/* Remove from active box */
 	spinlock_lock(&box->lock);
-	list_remove(&call->list);
+	list_remove(&call->link);
 	spinlock_unlock(&box->lock);
 	/* Send back answer */
@@ -198,5 +197,5 @@
 
 	spinlock_lock(&box->lock);
-	list_append(&call->list, &box->calls);
+	list_append(&call->link, &box->calls);
 	spinlock_unlock(&box->lock);
 	waitq_wakeup(&box->wq, 0);
@@ -262,5 +261,5 @@
 		/* Remove myself from answerbox */
 		spinlock_lock(&box->lock);
-		list_remove(&phone->list);
+		list_remove(&phone->link);
 		spinlock_unlock(&box->lock);
 
@@ -277,6 +276,4 @@
 	}
 
-	phone->callee = 0;
-	
 	phone->state = IPC_PHONE_HUNGUP;
 	spinlock_unlock(&phone->lock);
@@ -298,5 +295,5 @@
 {
 	spinlock_lock(&oldbox->lock);
-	list_remove(&call->list);
+	list_remove(&call->link);
 	spinlock_unlock(&oldbox->lock);
 
@@ -331,6 +328,6 @@
 		spinlock_lock(&box->irq_lock);
 
-		request = list_get_instance(box->irq_notifs.next, call_t, list);
-		list_remove(&request->list);
+		request = list_get_instance(box->irq_notifs.next, call_t, link);
+		list_remove(&request->link);
 
 		spinlock_unlock(&box->irq_lock);
@@ -338,13 +335,13 @@
 	} else if (!list_empty(&box->answers)) {
 		/* Handle asynchronous answers */
-		request = list_get_instance(box->answers.next, call_t, list);
-		list_remove(&request->list);
+		request = list_get_instance(box->answers.next, call_t, link);
+		list_remove(&request->link);
 		atomic_dec(&request->data.phone->active_calls);
 	} else if (!list_empty(&box->calls)) {
 		/* Handle requests */
-		request = list_get_instance(box->calls.next, call_t, list);
-		list_remove(&request->list);
+		request = list_get_instance(box->calls.next, call_t, link);
+		list_remove(&request->link);
 		/* Append request to dispatch queue */
-		list_append(&request->list, &box->dispatched_calls);
+		list_append(&request->link, &box->dispatched_calls);
 	} else {
 		/* This can happen regularly after ipc_cleanup, remove
@@ -365,6 +362,6 @@
 
 	while (!list_empty(lst)) {
-		call = list_get_instance(lst->next, call_t, list);
-		list_remove(&call->list);
+		call = list_get_instance(lst->next, call_t, link);
+		list_remove(&call->link);
 
 		IPC_SET_RETVAL(call->data, EHANGUP);
@@ -395,6 +392,5 @@
 	while (!list_empty(&task->answerbox.connected_phones)) {
 		phone = list_get_instance(task->answerbox.connected_phones.next,
-					  phone_t,
-					  list);
+					  phone_t, link);
 		if (! spinlock_trylock(&phone->lock)) {
 			spinlock_unlock(&task->answerbox.lock);
@@ -405,5 +401,5 @@
 		ASSERT(phone->state == IPC_PHONE_CONNECTED);
 		phone->state = IPC_PHONE_SLAMMED;
-		list_remove(&phone->list);
+		list_remove(&phone->link);
 
 		spinlock_unlock(&phone->lock);
@@ -452,2 +448,81 @@
 }
 
+
+/** Kconsole - list answerbox contents */
+void ipc_print_task(task_id_t taskid)
+{
+	task_t *task;
+	int i;
+	call_t *call;
+	link_t *tmp;
+	
+	spinlock_lock(&tasks_lock);
+	task = task_find_by_id(taskid);
+	if (task) 
+		spinlock_lock(&task->lock);
+	spinlock_unlock(&tasks_lock);
+	if (!task)
+		return;
+
+	/* Print opened phones & details */
+	printf("PHONE:\n");
+	for (i=0; i < IPC_MAX_PHONES;i++) {
+		spinlock_lock(&task->phones[i].lock);
+		if (task->phones[i].state != IPC_PHONE_FREE) {
+			printf("%d: ",i);
+			switch (task->phones[i].state) {
+			case IPC_PHONE_CONNECTING:
+				printf("connecting ");
+				break;
+			case IPC_PHONE_CONNECTED:
+				printf("connected to: %P ", 
+				       task->phones[i].callee);
+				break;
+			case IPC_PHONE_SLAMMED:
+				printf("slammed by: %P ", 
+				       task->phones[i].callee);
+				break;
+			case IPC_PHONE_HUNGUP:
+				printf("hung up - was: %P ", 
+				       task->phones[i].callee);
+				break;
+			default:
+				break;
+			}
+			printf("active: %d\n", atomic_get(&task->phones[i].active_calls));
+		}
+		spinlock_unlock(&task->phones[i].lock);
+	}
+
+
+	/* Print answerbox - calls */
+	spinlock_lock(&task->answerbox.lock);
+	printf("ABOX - CALLS:\n");
+	for (tmp=task->answerbox.calls.next; tmp != &task->answerbox.calls;tmp = tmp->next) {
+		call = list_get_instance(tmp, call_t, link);
+		printf("Callid: %P Srctask:%lld M:%d A1:%d A2:%d A3:%d Flags:%x\n",call,
+		       call->sender->taskid, IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
+		       IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), call->flags);
+	}
+	/* Print answerbox - calls */
+	printf("ABOX - DISPATCHED CALLS:\n");
+	for (tmp=task->answerbox.dispatched_calls.next; 
+	     tmp != &task->answerbox.dispatched_calls; 
+	     tmp = tmp->next) {
+		call = list_get_instance(tmp, call_t, link);
+		printf("Callid: %P Srctask:%lld M:%d A1:%d A2:%d A3:%d Flags:%x\n",call,
+		       call->sender->taskid, IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
+		       IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), call->flags);
+	}
+	/* Print answerbox - calls */
+	printf("ABOX - ANSWERS:\n");
+	for (tmp=task->answerbox.answers.next; tmp != &task->answerbox.answers; tmp = tmp->next) {
+		call = list_get_instance(tmp, call_t, link);
+		printf("Callid:%P M:%d A1:%d A2:%d A3:%d Flags:%x\n",call,
+		       IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
+		       IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), call->flags);
+	}
+
+	spinlock_unlock(&task->answerbox.lock);
+	spinlock_unlock(&task->lock);
+}
