mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
evil ass bug
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@260 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
@@ -78,7 +78,7 @@ dsp_uart_handle_t *dsp_uart_create(dsp_uart_attr_t *attr)
|
||||
|
||||
handle = malloc(sizeof (*handle));
|
||||
if (handle) {
|
||||
memset(handle, 0, sizeof (handle));
|
||||
memset(handle, 0, sizeof (*handle));
|
||||
|
||||
/* fill the attributes member */
|
||||
memcpy(&handle->attr, attr, sizeof (*attr));
|
||||
@@ -111,8 +111,8 @@ void dsp_uart_bit_handler(void *x, int bit)
|
||||
|
||||
handle->data >>= 1;
|
||||
handle->data |= 0x80 * !!bit;
|
||||
|
||||
handle->nbits++;
|
||||
|
||||
if (handle->nbits == 8) {
|
||||
handle->attr.bytehandler(handle->attr.bytehandler_arg, handle->data);
|
||||
handle->nbits = 0;
|
||||
|
Reference in New Issue
Block a user