agent/wpthook/requests.cc
/*-----------------------------------------------------------------------------
  Allow data to be modified.
-----------------------------------------------------------------------------*/
Allow data to be modified.
Allow data to be modified .
bool Requests::ModifyDataOut(DWORD socket_id, DataChunk& chunk) {
  bool is_modified = false;
  if (_test_state._active) {
    EnterCriticalSection(&cs);
    Request * request = GetOrCreateRequest(socket_id, chunk);
    if (request) {
      _test_state.ActivityDetected();
      is_modified = request->ModifyDataOut(chunk);
    } else {
      is_modified = chunk.ModifyDataOut(_test);
    }
    WptTrace(loglevel::kFunction,
        _T("[wpthook] Requests::ModifyDataOut(socket_id=%d, len=%d) -> %d"),
        socket_id, chunk.GetLength(), is_modified);
    LeaveCriticalSection(&cs);
  }
  return is_modified;
}
bool Requests :: ModifyDataOut ( DWORD socket_id , DataChunk & chunk ) { bool is_modified = false ; if ( _test_state . _active ) { EnterCriticalSection ( & cs ) ; Request * request = GetOrCreateRequest ( socket_id , chunk ) ; if ( request ) { _test_state . ActivityDetected ( ) ; is_modified = request -> ModifyDataOut ( chunk ) ; } else { is_modified = chunk . ModifyDataOut ( _test ) ; } WptTrace ( loglevel :: kFunction , _T ( " " ) , socket_id , chunk . GetLength ( ) , is_modified ) ; LeaveCriticalSection ( & cs ) ; } return is_modified ; }
Allow data to be modified.
Allow data to be modified .