@ -1174,6 +1174,16 @@ impl NFSState {
tdf . chunk_count + = 1 ;
tdf . chunk_count + = 1 ;
let cs = tdf . file_tracker . update ( files , flags , data , gap_size ) ;
let cs = tdf . file_tracker . update ( files , flags , data , gap_size ) ;
/* see if we need to close the tx */
if tdf . file_tracker . is_done ( ) {
if direction = = STREAM_TOCLIENT {
tx . response_done = true ;
SCLogDebug ! ( "TX {} response is done now that the file track is ready" , tx . id ) ;
} else {
tx . request_done = true ;
SCLogDebug ! ( "TX {} request is done now that the file track is ready" , tx . id ) ;
}
}
cs
cs
} ,
} ,
None = > { 0 } ,
None = > { 0 } ,
@ -1235,6 +1245,9 @@ impl NFSState {
}
}
let is_partial = reply . data . len ( ) < reply . count as usize ;
SCLogDebug ! ( "partial data? {}" , is_partial ) ;
let found = match self . get_file_tx_by_handle ( & file_handle , STREAM_TOCLIENT ) {
let found = match self . get_file_tx_by_handle ( & file_handle , STREAM_TOCLIENT ) {
Some ( ( tx , files , flags ) ) = > {
Some ( ( tx , files , flags ) ) = > {
let ref mut tdf = match tx . type_data {
let ref mut tdf = match tx . type_data {
@ -1251,7 +1264,13 @@ impl NFSState {
tx . nfs_response_status = reply . status ;
tx . nfs_response_status = reply . status ;
tx . is_last = true ;
tx . is_last = true ;
tx . request_done = true ;
tx . request_done = true ;
tx . response_done = true ;
/* if this is a partial record we will close the tx
* when we ' ve received the final data * /
if ! is_partial {
tx . response_done = true ;
SCLogDebug ! ( "TX {} is DONE" , tx . id ) ;
}
}
}
true
true
} ,
} ,
@ -1275,7 +1294,13 @@ impl NFSState {
tx . nfs_response_status = reply . status ;
tx . nfs_response_status = reply . status ;
tx . is_last = true ;
tx . is_last = true ;
tx . request_done = true ;
tx . request_done = true ;
tx . response_done = true ;
/* if this is a partial record we will close the tx
* when we ' ve received the final data * /
if ! is_partial {
tx . response_done = true ;
SCLogDebug ! ( "TX {} is DONE" , tx . id ) ;
}
}
}
}
}