Home

Traffic Server Software Developers Kit

INKActionDone

Tells you if an action is completed.

Prototype

int INKActionDone (INKAction actionp)

Description

actionp is a completed action. If a NULL argument is passed to INKActionDone, then Traffic Server crashes and does not return INK_ERROR.

Note: it is the programmer’s responsibility to ensure that a non-null value is passed to INKActionDone.

[Important] Important

Always use INKActionDone immediately after the call that assigns the action.
For example:

actionp = INKContSchedule(contp, SOME_TIMEOUT_VALUE);
if (INKActionDone(actionp)){
    //event has already occurred 
   }

If you call INKActionDone(actionp) some time later or some where else, then it always returns false and therefore does not accurately reflect whether the action is completed.

Returns

0 if the action has not completed.

1 if the action has completed

INK_ERROR if an error has occurred.