[asterisk-commits] igorg: trunk r339832 - in /trunk: ./ channels/chan_unistim.c

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


Author: igorg
Date: Sat Oct  8 10:05:41 2011
New Revision: 339832

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

................
  r339831 | igorg | 2011-10-08 22:01:35 +0700 (Сбт, 08 Окт 2011) | 14 lines
  
  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:
    trunk/   (props changed)
    trunk/channels/chan_unistim.c

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

Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=339832&r1=339831&r2=339832
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Sat Oct  8 10:05:41 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