
from packet import *

class ASN1_Packet(Packet):
    ASN1_root = None
    ASN1_codec = None    
    def init_fields(self):
        flist = self.ASN1_root.get_fields_list()
        self.do_init_fields(flist)
        self.fields_desc = flist    
    def self_build(self):
        return self.ASN1_root.build(self)    
    def do_dissect(self, x):
        return self.ASN1_root.dissect(self, x)
        



from packet import *

class ASN1_Packet(Packet):
    ASN1_root = None
    ASN1_codec = None    
    def init_fields(self):
        flist = self.ASN1_root.get_fields_list()
        self.do_init_fields(flist)
        self.fields_desc = flist    
    def self_build(self):
        if self.raw_packet_cache is not None:
            return self.raw_packet_cache
        return self.ASN1_root.build(self)    
    def do_dissect(self, x):
        return self.ASN1_root.dissect(self, x)
        


Add cache support for ASN1_Packet()
Add cache support for ASN1_Packet()

--HG--
branch : fix-padding-after-pull-request-18

  
  from packet import *
  
  class ASN1_Packet(Packet):
      ASN1_root = None
      ASN1_codec = None    
      def init_fields(self):
          flist = self.ASN1_root.get_fields_list()
          self.do_init_fields(flist)
          self.fields_desc = flist    
      def self_build(self):
+         if self.raw_packet_cache is not None:
+             return self.raw_packet_cache
          return self.ASN1_root.build(self)    
      def do_dissect(self, x):
          return self.ASN1_root.dissect(self, x)
          
  
  
Add cache support for ASN1_Packet()
## Code Before:

from packet import *

class ASN1_Packet(Packet):
    ASN1_root = None
    ASN1_codec = None    
    def init_fields(self):
        flist = self.ASN1_root.get_fields_list()
        self.do_init_fields(flist)
        self.fields_desc = flist    
    def self_build(self):
        return self.ASN1_root.build(self)    
    def do_dissect(self, x):
        return self.ASN1_root.dissect(self, x)
        


## Instruction:
Add cache support for ASN1_Packet()
## Code After:

from packet import *

class ASN1_Packet(Packet):
    ASN1_root = None
    ASN1_codec = None    
    def init_fields(self):
        flist = self.ASN1_root.get_fields_list()
        self.do_init_fields(flist)
        self.fields_desc = flist    
    def self_build(self):
        if self.raw_packet_cache is not None:
            return self.raw_packet_cache
        return self.ASN1_root.build(self)    
    def do_dissect(self, x):
        return self.ASN1_root.dissect(self, x)
        

