/* task completed, remove it */
this->active_tasks->remove_at(this->active_tasks, enumerator);
task->destroy(task);
- break;
+ continue;
case NEED_MORE:
expect_response = TRUE;
/* processed, but task needs another exchange */
+ continue;
+ case ALREADY_DONE:
+ flush_queue(this, this->active_tasks);
break;
case FAILED:
default:
flush(this);
return DESTROY_ME;
}
+ break;
}
enumerator->destroy(enumerator);
{
task->destroy(task);
}
- break;
+ continue;
case NEED_MORE:
/* processed, but task needs another exchange */
if (handle_collisions(this, task))
this->passive_tasks->remove_at(this->passive_tasks,
enumerator);
}
+ continue;
+ case ALREADY_DONE:
+ flush_queue(this, this->passive_tasks);
break;
case FAILED:
default:
delete = TRUE;
break;
}
- if (delete)
- {
- break;
- }
+ break;
}
enumerator->destroy(enumerator);
/* task completed, remove it */
this->passive_tasks->remove_at(this->passive_tasks, enumerator);
task->destroy(task);
- break;
+ continue;
case NEED_MORE:
/* processed, but task needs at least another call to build() */
send_response = TRUE;
+ continue;
+ case ALREADY_DONE:
+ send_response = FALSE;
+ flush_queue(this, this->passive_tasks);
break;
- case FAILED_SEND_ERROR:
- send_notify_response(this, NULL, 0, chunk_empty, task);
case FAILED:
default:
charon->bus->ike_updown(charon->bus, this->ike_sa, FALSE);
task->destroy(task);
return DESTROY_ME;
}
+ break;
}
enumerator->destroy(enumerator);
/* task completed, remove it */
this->active_tasks->remove_at(this->active_tasks, enumerator);
task->destroy(task);
- break;
+ continue;
case NEED_MORE:
/* processed, but task needs another exchange */
+ continue;
+ case ALREADY_DONE:
+ flush_queue(this, this->active_tasks);
break;
case FAILED:
default:
task->destroy(task);
return DESTROY_ME;
}
+ break;
}
enumerator->destroy(enumerator);
* - FAILED if a critical error occurred
* - DESTROY_ME if IKE_SA has been properly deleted
* - NEED_MORE if another call to build/process needed
+ * - ALREADY_DONE to cancel all active or passive tasks
* - SUCCESS if task completed
*/
status_t (*build) (task_t *this, message_t *message);
* - FAILED if a critical error occurred
* - DESTROY_ME if IKE_SA has been properly deleted
* - NEED_MORE if another call to build/process needed
+ * - ALREADY_DONE to cancel all active or passive tasks
* - SUCCESS if task completed
*/
status_t (*process) (task_t *this, message_t *message);