Changeset 77 for trunk/src/template.c

Show
Ignore:
Timestamp:
11/03/08 10:46:51 (14 years ago)
Author:
andreu
Message:

some updates to prepare release 0.0.12

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/template.c

    r76 r77  
    3636  unsigned short os; 
    3737  unsigned char buffer2[2]; 
    38    
     38 
    3939  if ( cfn == 0 ) { 
    4040    os = 20+8+20; 
     
    7878  unsigned short badFieldLength = 0; 
    7979  unsigned short badFieldCount = 0; 
    80    
     80 
    8181  buffer2[1]= *(buf+(*offV9)); (*offV9)++; cpt++; 
    8282  buffer2[0]= *(buf+(*offV9)); (*offV9)++; cpt++; 
     
    166166        buffer2[1]= *(buf+(*offV9)); (*offV9)++; cpt++; 
    167167        buffer2[0]= *(buf+(*offV9)); (*offV9)++; cpt++; 
    168         if ( (fldPtr->fieldType = *((unsigned short*)&buffer2) ) > 89) { 
     168        if ( (fldPtr->fieldType = *((unsigned short*)&buffer2) ) > 216) { 
    169169          badFieldNumber = 1; 
    170170        } 
     
    205205          } 
    206206          syslog (LOG_INFO,  
    207                   "in new template: field nb gt 89, field lg gt 16 or too many fields, bad template definition possibility"); 
     207                  "in new template: field nb gt 216, field lg gt 16 or too many fields, bad template definition possibility"); 
    208208          fprintf(stderr,   
    209209                  "\n in new template function: too many fields, bug collector or wrong template def \n");   
     
    272272        buffer2[1]= *(buf+(*offV9)); (*offV9)++; cpt++; 
    273273        buffer2[0]= *(buf+(*offV9)); (*offV9)++; cpt++; 
    274         if ( (fldPtr->fieldType = *((unsigned short*)&buffer2) ) > 89) { 
     274        if ( (fldPtr->fieldType = *((unsigned short*)&buffer2) ) > 216) { 
    275275          badFieldNumber = 1; 
    276276        } 
     
    397397  length = *((unsigned short*)&buffer2); 
    398398  do { 
    399     /*#ifdef DEBUG    */ 
     399#ifdef DEBUG     
    400400    fprintf (stderr, "< %hu, %hu, ",getFlowsetId, length); 
    401     /*#endif*/ 
     401#endif 
    402402    badFieldNumber = 0; 
    403403    badFieldLength = 0; 
     
    425425        buffer2[1]= *(buf+(*offV9)); (*offV9)++; cpt++; 
    426426        buffer2[0]= *(buf+(*offV9)); (*offV9)++; cpt++; 
    427         if ( (tmp->fieldType = *((unsigned short*)&buffer2) ) > 89) { 
     427        if ( (tmp->fieldType = *((unsigned short*)&buffer2) ) > 216) { 
    428428          badFieldNumber = 1; 
    429429        } 
     
    454454          syslog (LOG_INFO,  
    455455                  "in option template function: too many fields, bug collector or wrong template def in template update"); 
    456           /*#ifdef DEBUG*/ 
     456#ifdef DEBUG 
    457457          fprintf(stderr, 
    458458                  "\nin option template function: too many fields, bug collector or wrong template def in template update\n"); 
    459           /*#endif*/ 
     459#endif 
    460460          while ( ((*offV9))> (index)){ 
    461461            buffer2[1]= *(buf+index); index++; 
     
    518518        buffer2[1]= *(buf+(*offV9)); (*offV9)++; cpt++; 
    519519        buffer2[0]= *(buf+(*offV9)); (*offV9)++; cpt++; 
    520         if ( (tmp->fieldType = *((unsigned short*)&buffer2) ) > 89) { 
     520        if ( (tmp->fieldType = *((unsigned short*)&buffer2) ) > 216) { 
    521521          badFieldNumber = 1; 
    522522        } 
     
    545545          syslog (LOG_INFO,  
    546546                  "in update option tpl function: too many fields, bug collector or wrong template def in template update"); 
    547           /*#ifdef DEBUG*/ 
     547#ifdef DEBUG 
    548548          fprintf(stderr, 
    549549                  "\nin update option tpl function: too many fields, bug collector or wrong template def in template update\n"); 
    550           /*#endif*/ 
     550#endif 
    551551          ptplotmp = cTOPtr; 
    552552          if (ptplotmp->prev == NULL) { 
     
    574574  } while ((cpt) < (length-2)); 
    575575  /*   show_all_tplFlSet(); */ 
    576   /*#ifdef DEBUG*/ 
     576#ifdef DEBUG 
    577577  fprintf (stderr, ">"); 
    578   /*#endif*/ 
     578#endif 
    579579  return length; 
    580580}