[asterisk-commits] igorg: branch 10 r339831 - in /branches/10: ./ channels/chan_unistim.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Oct 8 10:01:39 CDT 2011


Author: igorg
Date: Sat Oct  8 10:01:35 2011
New Revision: 339831

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=339831
Log:
Merged revisions 339830 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r339830 | igorg | 2011-10-08 21:56:35 +0700 (Сбт, 08 Окт 2011) | 8 lines
  
  
  Fix char array cast as short array in send_client() function (for ARM
  platform)
  
  (closes issue ASTERISK-17314)
  Reported by: jjoshua
........

Modified:
    branches/10/   (props changed)
    branches/10/channels/chan_unistim.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_unistim.c?view=diff&rev=339831&r1=339830&r2=339831
==============================================================================
--- branches/10/channels/chan_unistim.c (original)
+++ branches/10/channels/chan_unistim.c Sat Oct  8 10:01:35 2011
@@ -802,7 +802,7 @@
 {
 	unsigned int tick;
 	int buf_pos;
-	unsigned short *sdata = (unsigned short *) data;
+	unsigned short seq = ntohs(++pte->seq_server);
 
 	ast_mutex_lock(&pte->lock);
 	buf_pos = pte->last_buf_available;
@@ -812,7 +812,7 @@
 		ast_mutex_unlock(&pte->lock);
 		return;
 	}
-	sdata[1] = ntohs(++(pte->seq_server));
+	memcpy((void *)data + sizeof(unsigned short), (void *)&seq, sizeof(unsigned short));
 	pte->wsabufsend[buf_pos].len = size;
 	memcpy(pte->wsabufsend[buf_pos].buf, data, size);
 




More information about the asterisk-commits mailing list