rem: return -1;
add: ret=-1; goto end;
context: int add_route(str* realm, str* dst){	struct route_entry* re;	struct peer_entry* pe;	struct peer_entry* new_pe;	struct peer_entry*  pi;	struct route_entry* ri;		/* find coreponding peer, try alias match, full uri(id) match and	 *  host match */	for (pe=cfg_peer_lst; pe; pe=pe->next){		if ((pe->alias.len==dst->len)&&				(strncasecmp(pe->alias.s, dst->s, dst->len)==0))			break;		if ((pe->full_uri.len==dst->len)&&				(strncasecmp(pe->full_uri.s, dst->s, dst->len)==0))			break;		/* should we keep this? it's pretty ambiguos */		if ((pe->uri.host.len==dst->len)&&				(strncasecmp(pe->uri.host.s, dst->s, dst->len)==0))			break;	}	if (pe==0) goto error_no_peer;	new_pe=shm_malloc(sizeof(struct peer_entry));	if (new_pe==0) goto error_mem;	/* prepare the new peerlist entry */	*new_pe=*pe;	new_pe->next=0;		/* see if route for realm already exists */	for (re=route_lst; re; re=re->next){		if ((re->realm.len==realm->len)&&				(strncasecmp(re->realm.s, realm->s, realm->len)==0))			break;	}	if (re==0){		/* not found -> create new one */		re=shm_malloc(sizeof(struct route_entry));		if (re==0) goto error_mem;		memset(re,0, sizeof(struct route_entry));		re->realm=*realm;	}		/* append to the route_entry peer list */	LIST_APPEND(re->peer_l, new_pe, pi, next);	/* append the route entry to the main list */	LIST_APPEND(route_lst, re, ri, next);	return 0;error_mem:	LOG(L_ERR, "ERROR: add_route: memory allocation error\n");	return -1;error_no_peer:	LOG(L_ERR, "ERROR: add_route: no peer <%.*s> found\n", dst->len, dst->s);	return -1;}