Changeset 4279:5456f644df26 in roaraudio


Ignore:
Timestamp:
08/28/10 19:58:22 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

more debug infos, small fix in mes->datalen check

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/commands.c

    r3926 r4279  
    9898  return -1; 
    9999 
    100  if ( (func = g_commands[cmd].handler) == NULL ) 
     100 if ( (func = g_commands[cmd].handler) == NULL ) { 
     101  ROAR_WARN("command_exec(client=%i, mes=%p{.cmd=%i,...}, data=%p, flags=%p) = -1 // unknown command", client, mes, (int)mes->cmd, data, flags); 
    101102  return -1; 
     103 } 
    102104 
    103105 ROAR_DBG("command_exec(*): Execing command %i(%s) via %p", cmd, g_commands[cmd].name, func); 
  • roard/req.c

    r4277 r4279  
    677677 int test, bits; 
    678678 
     679 ROAR_DBG("req_on_get_stream_para(client=%i, mes=%p{.stream=%i, .datalen=%i,...}, data=%p, flags=%p) = ?", client, mes, (int)mes->stream, (int)mes->datalen, data, flags); 
     680 
    679681 if ( mes->datalen != 4 ) 
    680682  return -1; 
     
    761763 
    762764  case ROAR_STREAM_PARA_LTM: 
     765    ROAR_DBG("req_on_get_stream_para(client=%i, ...): LTM request...", client); 
     766 
    763767    if ( mes->datalen < (6 * 2) ) 
    764768     return -1; 
     
    770774    if ( d[2] != ROAR_LTM_SST_GET_RAW ) 
    771775     return -1; 
     776 
     777    ROAR_DBG("req_on_get_stream_para(client=%i, ...): LTM request of type GET_RAW", client); 
    772778 
    773779    test = d[5]; 
     
    783789 
    784790    if ( mes->stream == -1 ) { 
     791     ROAR_DBG("req_on_get_stream_para(client=%i, ...): LTM multi-stream request...", client); 
     792 
    785793     for (i = 6; i < mes->datalen/2; i++) { 
    786794      if ( (ltm = streams_lzm_get(d[i], d[5], d[3])) == NULL ) 
     
    790798     } 
    791799    } else { 
     800     ROAR_DBG("req_on_get_stream_para(client=%i, ...): LTM single-stream request for stream %i...", client, mes->stream); 
    792801     if ( (ltm = streams_lzm_get(mes->stream, d[5], d[3])) == NULL ) 
    793802      return -1; 
     
    801810    needed += 2; // header 
    802811 
    803     if ( needed > LIBROAR_BUFFER_MSGDATA ) { 
     812    ROAR_DBG("req_on_get_stream_para(client=%i, ...): data size for answer is %i 64 bit sub-packets", client, (int)needed); 
     813 
     814    if ( (needed*8) > LIBROAR_BUFFER_MSGDATA ) { 
    804815     return -1; 
    805816     if ( (d64 = malloc(needed*8)) == NULL ) 
     
    875886 
    876887    mes->datalen = needed * 8; 
     888    ROAR_DBG("req_on_get_stream_para(client=%i, ...): LTM final message has %i byte of data", client, (int)mes->datalen); 
     889    ROAR_DBG("req_on_get_stream_para(client=%i, ...): LTM GET_RAW request: OK. returning...", client); 
    877890   break; 
    878891 
     
    882895 } 
    883896 
     897 ROAR_DBG("req_on_get_stream_para(client=%i, mes=%p{.stream=%i, .datalen=%i,...}, data=%p, flags=%p) = 0 // returning OK", client, mes, (int)mes->stream, (int)mes->datalen, data, flags); 
    884898 mes->cmd = ROAR_CMD_OK; 
    885899 return 0; 
Note: See TracChangeset for help on using the changeset viewer.