Remove uri front spaces on sal_address_new().

This commit is contained in:
Guillaume Beraudo 2011-05-11 12:23:36 +02:00
parent 0f8e893f80
commit 897ec72a8a

View file

@ -1918,6 +1918,12 @@ int sal_unregister(SalOp *h){
SalAddress * sal_address_new(const char *uri){
osip_from_t *from;
osip_from_init(&from);
// Remove front spaces
while (uri[0]==' ') {
uri++;
}
if (osip_from_parse(from,uri)!=0){
osip_from_free(from);
return NULL;