| 1121 | } |
| 1122 | |
| 1123 | int |
| 1124 | UnixNetVConnection::populate(Connection &con_in, Continuation *c, void * /* arg ATS_UNUSED */) |
| 1125 | { |
| 1126 | this->con.move(con_in); |
| 1127 | this->mutex = c->mutex; |
| 1128 | this->thread = this_ethread(); |
| 1129 | |
| 1130 | EThread *t = this_ethread(); |
| 1131 | NetHandler *h = get_NetHandler(t); |
| 1132 | |
| 1133 | MUTEX_TRY_LOCK(lock, h->mutex, t); |
| 1134 | if (!lock.is_locked()) { |
| 1135 | // Clean up and go home |
| 1136 | return EVENT_ERROR; |
| 1137 | } |
| 1138 | |
| 1139 | if (h->startIO(this) < 0) { |
| 1140 | Dbg(dbg_ctl_iocore_net, "populate : Failed to add to epoll list"); |
| 1141 | return EVENT_ERROR; |
| 1142 | } |
| 1143 | |
| 1144 | ink_assert(this->nh != nullptr); |
| 1145 | SET_HANDLER(&UnixNetVConnection::mainEvent); |
| 1146 | this->nh->startCop(this); |
| 1147 | ink_assert(this->con.sock.is_ok()); |
| 1148 | return EVENT_DONE; |
| 1149 | } |
| 1150 | |
| 1151 | int |
| 1152 | UnixNetVConnection::connectUp(EThread *t, int fd) |
no test coverage detected