[Asterisk-bsd] Re: One Way Audio

Tom Ivar Helbekkmo tih at eunetnorge.no
Mon Oct 18 05:21:00 CDT 2004


Tom Ivar Helbekkmo <tih at eunetnorge.no> writes:

> I've submitted a new patch to Digium to reinstate the proper use of
> the routing socket, and will be submitting a patch to the NetBSD
> maintainers to make this feature actually work there.  Meanwhile, what
> you want is for the relevant bit of Asterisk's acl.c to look like this:

One more change is needed, actually, because with just that one, and
the NetBSD kernel fix, it only works the first time.  :-)  There's a
hard coded '1' in acl.c that needs to be a reference to the sequence
number used for the query.  Change...

	do {
		l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
	} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != 1 || m_rtmsg.m_rtm.rtm_pid != pid));

...into...

	do {
		l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
	} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != seq || m_rtmsg.m_rtm.rtm_pid != pid));

...that is, just replace that '1' with 'seq', and it'll be OK.  The
submitted patch is updated; it (and the one for NetBSD) can be found
in Mantis, in bug number 2668.

-tih
-- 
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no  T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145


More information about the Asterisk-BSD mailing list