SipHeaderFactories::getFactory crashes if header is not found

Philippe Torrelli philippe.torrelli at alcatel.fr
Mon Oct 30 19:02:44 CET 2006


Hello

Trying to have v 2891 to work, SipHeaderFactories::getFactory
 now crashes when the header is not found...

Fixed it this way

SipHeaderFactoryFuncPtr SipHeaderFactories::getFactory(const string
headerType) const{
	std::string ht;
	for (unsigned i=0; i< headerType.size();i++){
		ht+=toupper(headerType[i]);
	}
	std::map<std::string, SipHeaderFactoryFuncPtr >::const_iterator res;
	res = factories.find(ht);
	if( res != factories.end())
	{
		return (*factories.find(ht)).second;
	}
	else
	{
		return NULL;
	}
}

Philippe Torrelli



More information about the Minisip-devel mailing list