Changeset 423

Show
Ignore:
Timestamp:
07/26/06 13:27:19
Author:
ben
Message:

Failure to consume the packet is an error.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openpgpsdk/trunk/include/openpgpsdk/errors.h

    r422 r423  
    3232    OPS_E_P_PACKET_CONSUMED     =OPS_E_P+3, 
    3333    OPS_E_P_MPI_FORMAT_ERROR    =OPS_E_P+4, 
     34    OPS_E_P_PACKET_NOT_CONSUMED =OPS_E_P+5, 
    3435 
    3536    /* creator errors */ 
  • openpgpsdk/trunk/src/packet-parse.c

    r412 r423  
    18741874        WARNP(pinfo,"Problem consuming remainder of error packet."); 
    18751875    else 
    1876         return 0; 
     1876        { 
     1877        ERRCODEP(pinfo,OPS_E_P_PACKET_NOT_CONSUMED); 
     1878        return 0; 
     1879        } 
    18771880 
    18781881    return 1; 
     
    24702473 
    24712474    if(region.length != region.length_read && !region.indeterminate) 
    2472         if(!consume_packet(&region,pinfo,ops_true)) 
     2475        if(!consume_packet(&region,pinfo,ops_false)) 
    24732476            r=-1; 
    24742477 
     
    24772480    *pktlen=pinfo->rinfo.alength; 
    24782481 
    2479     /* do callback on entire packet, if desired */ 
    2480  
    2481     if(pinfo->rinfo.accumulate) 
     2482    /* do callback on entire packet, if desired and there was no error */ 
     2483 
     2484    if(r > 0 && pinfo->rinfo.accumulate) 
    24822485        { 
    24832486        C.packet.length=pinfo->rinfo.alength;