mirror of
https://github.com/nasa/trick.git
synced 2025-02-20 09:16:20 +00:00
trick comm byteswap functions can't handle sizes above 65536 bytes
sigh, I forgot to actually set the pthread specific data. refs #187
This commit is contained in:
parent
2cf25b9825
commit
8633facc86
@ -33,6 +33,7 @@ int tc_read_byteswap(TCDevice * device, char *buffer, int size, ATTRIBUTES * att
|
||||
if (( swap_buffer = pthread_getspecific(key)) == NULL ) {
|
||||
swap_buffer = malloc(sizeof(struct SwapBuffer)) ;
|
||||
swap_buffer->size = 0 ;
|
||||
pthread_setspecific(key, swap_buffer) ;
|
||||
}
|
||||
if ( (unsigned int)size > swap_buffer->size ) {
|
||||
unsigned int new_size = (unsigned int)size ;
|
||||
|
@ -33,6 +33,7 @@ int tc_write_byteswap(TCDevice * device, char *buffer, int size, ATTRIBUTES * at
|
||||
if (( swap_buffer = pthread_getspecific(key)) == NULL ) {
|
||||
swap_buffer = malloc(sizeof(struct SwapBuffer)) ;
|
||||
swap_buffer->size = 0 ;
|
||||
pthread_setspecific(key, swap_buffer) ;
|
||||
}
|
||||
if ( (unsigned int)size > swap_buffer->size ) {
|
||||
unsigned int new_size = (unsigned int)size ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user