#NEWLINE# def ProcessMessages( self , msg_list ) : #NEWLINE# #INDENT# blobs = [ ] #NEWLINE# for message in msg_list : #NEWLINE# #INDENT# if ( message . auth_state != rdf_flows . GrrMessage . AuthorizationState . AUTHENTICATED ) : #NEWLINE# #INDENT# logging . error ( 'TransferStore request from %s is not authenticated.' , message . source ) #NEWLINE# continue #NEWLINE# #UNINDENT# read_buffer = message . payload #NEWLINE# data = read_buffer . data #NEWLINE# if ( not data ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( read_buffer . compression == rdf_protodict . DataBlob . CompressionType . ZCOMPRESSION ) : #NEWLINE# #INDENT# data = zlib . decompress ( data ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( read_buffer . compression == rdf_protodict . DataBlob . CompressionType . UNCOMPRESSED ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise RuntimeError ( 'Unsupported compression' ) #NEWLINE# #UNINDENT# #UNINDENT# blobs . append ( data ) #NEWLINE# #UNINDENT# data_store . DB . StoreBlobs ( blobs , token = self . token )