Skip to content

Commit

Permalink
align OTF send with updated compiler api
Browse files Browse the repository at this point in the history
  • Loading branch information
gewang committed Oct 27, 2024
1 parent 86425c2 commit d464a09
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/core/chuck_otf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,23 +344,22 @@ t_CKINT otf_send_file( const char * fname, OTF_Net_Msg & msg, const char * op,
target->fd2parse = fd;
target->filename = filename;

// set current target
EM_setCurrentTarget( target );

// check to see if at least parses
if( !chuck_parse( target ) )
{
// error message
EM_error2( 0, "(parse error) skipping file '%s' for [%s]...", filename.c_str(), op );
// close file descriptor
fclose( fd );
// reset parser (clean up) | 1.5.1.5
reset_parse();
// clean up target
// clean up target, including closing the fd
CK_SAFE_DELETE( target );
return FALSE;
}
// reset parser (clean up) | 1.5.1.5
reset_parse();
// clean up target
CK_SAFE_DELETE( target );

// stat it
memset( &fs, 0, sizeof(fs) );
Expand Down Expand Up @@ -422,8 +421,8 @@ t_CKINT otf_send_file( const char * fname, OTF_Net_Msg & msg, const char * op,
// pop log
EM_poplog();

// close
fclose( fd );
// clean up target, including closing the fd
CK_SAFE_DELETE( target );

return TRUE;
}
Expand Down

0 comments on commit d464a09

Please sign in to comment.