Adding if guard for HAS_CONSOLE.
Fix memory corruption problem for user event.

The data structure moves around due to RESIZE(), so we can't
pass pointer around.
Fix memory corruption bug in lpc socket handling.

The data structure moves around due to RESIZE(), so we can't
pass pointer around.
Format source.
Merge pull request #117 from sunyc/master

Fix memory corruption problem in other part of event system.