oss_src/fileio/dmlcio/s3_filesys.cc
void CURLReadStreamBase::Cleanup() {  
  if (mcurl_ != NULL) {
    curl_multi_remove_handle(mcurl_, ecurl_);
    curl_easy_cleanup(ecurl_);
    curl_multi_cleanup(mcurl_);
    mcurl_ = NULL;
    ecurl_ = NULL;
  }
  if (slist_ != NULL) {
    curl_slist_free_all(slist_);
    slist_ = NULL;
  }
  buffer_.clear(); header_.clear();
  curr_bytes_ = 0; at_end_ = false;
}
// cleanup the previous sessions for restart
cleanup the previous sessions for restart
cleanup the previous sessions for restart
void CURLReadStreamBase::Cleanup() {  
  if (mcurl_ != NULL) {
    curl_multi_remove_handle(mcurl_, ecurl_);
    curl_easy_cleanup(ecurl_);
    curl_multi_cleanup(mcurl_);
    mcurl_ = NULL;
    ecurl_ = NULL;
  }
  if (slist_ != NULL) {
    curl_slist_free_all(slist_);
    slist_ = NULL;
  }
  buffer_.clear(); header_.clear();
  curr_bytes_ = 0; at_end_ = false;
}
void CURLReadStreamBase :: Cleanup ( ) { if ( mcurl_ != NULL ) { curl_multi_remove_handle ( mcurl_ , ecurl_ ) ; curl_easy_cleanup ( ecurl_ ) ; curl_multi_cleanup ( mcurl_ ) ; mcurl_ = NULL ; ecurl_ = NULL ; } if ( slist_ != NULL ) { curl_slist_free_all ( slist_ ) ; slist_ = NULL ; } buffer_ . clear ( ) ; header_ . clear ( ) ; curr_bytes_ = 0 ; at_end_ = false ; }
cleanup the previous sessions for restart
cleanup the previous sessions for restart