mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-21 04:46:29 +00:00
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 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -802,7 +802,7 @@ static void send_client(int size, const unsigned char *data, struct unistimsessi
|
|||||||
{
|
{
|
||||||
unsigned int tick;
|
unsigned int tick;
|
||||||
int buf_pos;
|
int buf_pos;
|
||||||
unsigned short *sdata = (unsigned short *) data;
|
unsigned short seq = ntohs(++pte->seq_server);
|
||||||
|
|
||||||
ast_mutex_lock(&pte->lock);
|
ast_mutex_lock(&pte->lock);
|
||||||
buf_pos = pte->last_buf_available;
|
buf_pos = pte->last_buf_available;
|
||||||
@@ -812,7 +812,7 @@ static void send_client(int size, const unsigned char *data, struct unistimsessi
|
|||||||
ast_mutex_unlock(&pte->lock);
|
ast_mutex_unlock(&pte->lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sdata[1] = ntohs(++(pte->seq_server));
|
memcpy((void *)data + sizeof(unsigned short), (void *)&seq, sizeof(unsigned short));
|
||||||
pte->wsabufsend[buf_pos].len = size;
|
pte->wsabufsend[buf_pos].len = size;
|
||||||
memcpy(pte->wsabufsend[buf_pos].buf, data, size);
|
memcpy(pte->wsabufsend[buf_pos].buf, data, size);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user