add: if (dst_realm->len>MAX_REALM_LEN){ LOG(L_ERR,"ERROR: route_dest: realm too big (%d)\n", dst_realm->len); return 0; } memcpy(realm, dst_realm->s, dst_realm->len); realm[dst_realm->len]=0;
context: struct peer_entry* route_dest(str* realm){	struct route_entry* re;		for (re=route_lst; re; re=re->next){		/*FNM_CASEFOLD | FNM_EXTMATCH - GNU extensions*/ 		if (fnmatch(re->realm.s, realm->s, 0)==0){			/*match */			DBG("route_dest: match on <%.*s> (<%.*s>)\n",				re->realm.len, re->realm.s, realm->len, realm->s);			return re->peer_l;		}	}	DBG("WARNING: route_dest: no route found for <%.*s>\n",		realm->len, realm->s);		return 0;}