Changeset 6034:ac2a2a593b1f in roaraudio for roard/req.c
- Timestamp:
- 10/10/14 11:10:34 (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/req.c
r6021 r6034 758 758 int req_on_gettimeofday (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 759 759 struct roar_time curtime; 760 uint64_t * d64 = (uint64_t *)mes->data; 760 761 761 762 ROAR_DBG("req_on_gettimeofday(client=%i, mes=%p, data=%p, flags=%p) = ?", client, mes, data, flags); … … 774 775 775 776 if ( mes->datalen >= 8 ) { 776 if ( * (uint64_t *)mes->data!= 0 ) {777 if ( *d64 != 0 ) { 777 778 return -1; 778 779 } … … 1001 1002 1002 1003 int req_on_get_standby (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 1004 uint16_t * d16 = (uint16_t*)mes->data; 1005 1003 1006 mes->cmd = ROAR_CMD_OK; 1004 1007 mes->pos = g_pos; 1005 1008 mes->datalen = 2; 1006 1009 1007 * ((uint16_t*)mes->data)= ROAR_HOST2NET16((unsigned) g_standby);1010 *d16 = ROAR_HOST2NET16((unsigned) g_standby); 1008 1011 1009 1012 return 0; … … 1011 1014 1012 1015 int req_on_set_standby (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 1016 uint16_t * d16 = (uint16_t*)mes->data; 1017 1013 1018 if ( mes->datalen != 2 ) 1014 1019 return -1; 1015 1020 1016 g_standby = ROAR_NET2HOST16(* ((uint16_t*)mes->data));1021 g_standby = ROAR_NET2HOST16(*d16); 1017 1022 1018 1023 mes->cmd = ROAR_CMD_OK;
Note: See TracChangeset
for help on using the changeset viewer.