Change both sizeof() calls to BOOL to match type of local var destination of your memcpy(). All are 4 bytes - just for consistency and in case BOOL gets changed.
Need an else at bottom (for not in idle standby mode) where we would set reject code to something like not in correct mode (I'm sure we have a code for this already). And then move the send response functional call to very end of this function so that it will always send a response in any case.