where you write
if(memcmp(master, target_tag[i], TAG_LEN) == 0 )
is PROBABLY wrong
try
if(memcmp(master, target_tag, TAG_LEN) == 0 )
where you write
if(memcmp(master, target_tag[i], TAG_LEN) == 0 )
is PROBABLY wrong
try
if(memcmp(master, target_tag, TAG_LEN) == 0 )