ZoneMinder/ZoneMinder — pull request #79 by knnniggett (2013-08-18 18:42:16+00:00)
Title: Added frameserver patch from Zoneminder Wiki

This adds the zoneminder frameserver patch, written by user genanr, and found in the wiki:
http://www.zoneminder.com/wiki/index.php/1.24.2_Patches

This seems to be a relatively popular patch, and I've been including this patch in my zoneminder builds since it was written. It does work with the latest version of zoneminder. In the grand scheme of things, I'm not so sure we even need a frameserver at all anymore, but for those that want to use it, this patch seems to make it work much better.

Original description follows:
This patch changes the socket reader in zmf from a single read, to a loop read. Incomplete reads would be reported even though the image writer wrote the whole image to the socket. The problem was when the read went to read the image frame from the socket, all the data had not yet been written to the socket by the writer, so the reader thought there was a problem. The loop reads from the socket until a full image frame is read, or there is an error.