add: if (val->len==0) val->s = 0;
context: static inline int get_route_param( struct sip_msg *msg, str *name, str *val){	char *p;	char *end;	char c;	int quoted;	/* check if the hooked params belong to the same message */	if (routed_msg_id != msg->id)		goto notfound;	/* check if params are present */	if ( !routed_params.s || !routed_params.len )		goto notfound;	end = routed_params.s + routed_params.len;	p = routed_params.s;	/* parse the parameters string and find the "name" param */	while ( end-p>name->len+2 ) {		if (p!=routed_params.s) {			/* go to first ';' char */			for( quoted=0 ; p<end && !(*p==';' && !quoted) ; p++ )				if ( (*p=='"' || *p=='\'') && *(p-1)!='\\' )					quoted ^= 0x1;			if (p==end)				goto notfound;			p++;		}		/* get first non space char */		while( p<end && (*p==' ' || *p=='\t') )			p++;		/* check the name - length first and content after */		if ( end-p<name->len+2 || memcmp(p,name->s,name->len)!=0 )			continue;		p+=name->len;		while( p<end && (*p==' ' || *p=='\t') )			p++;		if (*p!='=')			continue;		p++;		while( p<end && (*p==' ' || *p=='\t') )			p++;		if (p==end)			goto notfound;		/* get value */		if ( *p=='\'' || *p=='"') {			for( val->s = ++p ; p<end ; p++) {				if ((*p=='"' || *p=='\'') && *(p-1)!='\\' )					break;			}		} else {			for( val->s=p ; p<end ; p++) {				if ( (c=*p)==';' || c==' ' || c=='\t' )					break;			}		}		if(p==end)			goto notfound;		val->len = p-val->s;		break;	}	return 0;notfound:	return -1;}