[PATCH 06/16] handshake: Convert HANDSHAKE_EVENT_FAILED data to int