SMS comparison problem

By using strcmp() or maybe strncmp() on the buffered output,
just like you tried with the direct comparison, which does not work.

strstr() could be useful also, it depends on the format of the message.