Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision f3b97d11fcd4829f4c5fbcb964344d1c1738de08)
+++ kernel/generic/src/ipc/ipc.c	(revision 6f9c8f61e5d640581889aa12459d4708d04bcc6f)
@@ -255,15 +255,5 @@
 }
 
-/** Simulate sending back a message.
- *
- * Most errors are better handled by forming a normal backward
- * message and sending it as a normal answer.
- *
- * @param phone Phone structure the call should appear to come from.
- * @param call  Call structure to be answered.
- * @param err   Return value to be used for the answer.
- *
- */
-void ipc_backsend_err(phone_t *phone, call_t *call, sysarg_t err)
+static void _ipc_call_actions_internal(phone_t *phone, call_t *call)
 {
 	task_t *caller = phone->caller;
@@ -279,5 +269,20 @@
 
 	call->data.phone = phone;
-
+	call->data.task_id = caller->taskid;
+}
+
+/** Simulate sending back a message.
+ *
+ * Most errors are better handled by forming a normal backward
+ * message and sending it as a normal answer.
+ *
+ * @param phone Phone structure the call should appear to come from.
+ * @param call  Call structure to be answered.
+ * @param err   Return value to be used for the answer.
+ *
+ */
+void ipc_backsend_err(phone_t *phone, call_t *call, sysarg_t err)
+{
+	_ipc_call_actions_internal(phone, call);
 	IPC_SET_RETVAL(call->data, err);
 	_ipc_answer_free_call(call, false);
@@ -300,17 +305,6 @@
 	irq_spinlock_unlock(&caller->lock, true);
 	
-	if (!(call->flags & IPC_CALL_FORWARDED)) {
-		atomic_inc(&phone->active_calls);
-		call->caller_phone = phone;
-		call->sender = caller;
-
-		call->active = true;
-		spinlock_lock(&caller->active_calls_lock);
-		list_append(&call->ta_link, &caller->active_calls);
-		spinlock_unlock(&caller->active_calls_lock);
-
-		call->data.phone = phone;
-		call->data.task_id = caller->taskid;
-	}
+	if (!(call->flags & IPC_CALL_FORWARDED))
+		_ipc_call_actions_internal(phone, call);
 	
 	irq_spinlock_lock(&box->lock, true);
