src/pomp_prot.c
static void pomp_prot_check_magic(struct pomp_prot *prot, int idx, int val,
		enum pomp_prot_state state)
{
	if (prot->headerbuf[idx] != val) {
		POMP_LOGW("Bad header magic %d : 0x%02x(0x%02x)",
			idx, prot->headerbuf[idx], val);
		prot->state = POMP_PROT_STATE_HEADER_MAGIC_0;
	} else {
		prot->state = state;
	}
}
/**
 * Check that the magic bytes of the message header are valid.
 * @param prot : protocol decoder.
 * @param idx : index of magic byte to check.
 * @param val : expected value of magic byte.
 * @param state : next state if check is ok.
 */
Check that the magic bytes of the message header are valid.
@param prot : protocol decoder.
@param idx : index of magic byte to check.
@param val : expected value of magic byte.
@param state : next state if check is ok.
Check that the magic bytes of the message header are valid . @param prot : protocol decoder . @param idx : index of magic byte to check . @param val : expected value of magic byte . @param state : next state if check is ok .
static void pomp_prot_check_magic(struct pomp_prot *prot, int idx, int val,
		enum pomp_prot_state state)
{
	if (prot->headerbuf[idx] != val) {
		POMP_LOGW("Bad header magic %d : 0x%02x(0x%02x)",
			idx, prot->headerbuf[idx], val);
		prot->state = POMP_PROT_STATE_HEADER_MAGIC_0;
	} else {
		prot->state = state;
	}
}
static void pomp_prot_check_magic ( struct pomp_prot * prot , int idx , int val , enum pomp_prot_state state ) { if ( prot -> headerbuf [ idx ] != val ) { POMP_LOGW ( " " , idx , prot -> headerbuf [ idx ] , val ) ; prot -> state = POMP_PROT_STATE_HEADER_MAGIC_0 ; } else { prot -> state = state ; } }
Check that the magic bytes of the message header are valid.
Check that the magic bytes of the message header are valid .