Changeset 167

Show
Ignore:
Timestamp:
09/19/07 12:48:26 (1 year ago)
Author:
sip
Message:

Assertion check

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • app_h324m/app_h324m.c

    r161 r167  
    247247                        { 
    248248                                /* Set data*/ 
    249                                 send->data = (void*)send + AST_FRIENDLY_OFFSET; 
     249                                send->data = (unsigned char*)send + AST_FRIENDLY_OFFSET; 
    250250                                /* If it's not empty */ 
    251251                                if (vt->bufferLength) 
     
    264264                        } else { 
    265265                                /* Set data*/ 
    266                                 send->data = (void*)send + AST_FRIENDLY_OFFSET; 
     266                                send->data = (unsigned char*)send + AST_FRIENDLY_OFFSET; 
    267267                                send->datalen =  vt->bufferLength + 2  ; 
    268268                                /* If it's not empty */ 
     
    274274                                ((unsigned char*)(send->data))[1] = 0x00; 
    275275                        } 
     276                         
     277                        /* Assertion test */ 
     278                        if (i>framelength) 
     279                        { 
     280                                /* Never should happen */ 
     281                                ast_log(LOG_ERROR, "Counter past of frame [%d,%d]\n",i,framelength); 
     282                                /* Empty */ 
     283                                vt->bufferLength = 0; 
    276284                        /* If we have to send the begging of this frame */ 
    277                         if (i>0 && found) 
    278                         { 
     285                        } else if (i>0 && found) { 
    279286                                /* Copy the begining to the packet to send*/ 
    280287                                memcpy(send->data+send->datalen,framedata,i); 
Copyright 2006 - Sergio García Murillo
Powered by Trac - Edgewall Software