Maybe change this to if(strncmp("DONE!", (char*)ssResp->ussdStr, 5) == 0) ? I think it'd be more appropiate