[asterisk-dev] [patch] Alignment fix for main/event.c

Rafal Boni rafal at pobox.com
Mon Dec 10 23:24:36 CST 2007


I whined about this in my earlier email -- if you're running on a
machine that cares about alignment constraints of data (sparc64 in my
case), event.c has at least a few gotchas and will likely cause a crash
before Asterisk can answer the 1st call..

<obcommentary>
I also am not sure that if I wanted the events to be wire-shippable
between systems that I'd do it the way it's done there -- especially
trying to ship enums in any on-wire transport seems pretty dangerous.  A
a better idea ISTM would be to leave the events unmolested inside the
system and build a marshalling / unmarshalling layer for putting them on
the wire.  Then you don't care as much about all this enddian-frobbing,
alignment and buffer-walking if you're just queueing / passing them
around inside a single process (or even single machine).

All that from looking at a couple of source files in isolation ;)
</obcommentary>

Patch which gets my trunk build to actually run the demo config from a
softphone, and succesfully dial out to digium's test server is attached.

--rafal
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ast-event-alignment-fix.diff
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20071211/23eb1beb/attachment.txt 


More information about the asterisk-dev mailing list