| 18 | } |
| 19 | |
| 20 | void aio_timer_writer::timer_callback(unsigned int id acl_unused) |
| 21 | { |
| 22 | if (out_ == NULL) { |
| 23 | return; |
| 24 | } |
| 25 | |
| 26 | bool findit = false; |
| 27 | |
| 28 | if (out_->timer_writers_) { |
| 29 | std::list<aio_timer_writer*>::iterator it = |
| 30 | out_->timer_writers_->begin(); |
| 31 | for (; it != out_->timer_writers_->end(); ++it) { |
| 32 | if ((*it) == this) { |
| 33 | out_->timer_writers_->erase(it); |
| 34 | findit = true; |
| 35 | break; |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | if (findit == false) { |
| 41 | logger_warn("Warning: timer_writer is the end!"); |
| 42 | } |
| 43 | |
| 44 | out_->write(buf_.c_str(), (int) buf_.length(), 0, NULL); |
| 45 | } |
| 46 | |
| 47 | ////////////////////////////////////////////////////////////////////// |
| 48 | |