| 3229 | |
| 3230 | |
| 3231 | ISC_STATUS rem_port::end_database(P_RLSE* /*release*/, PACKET* sendL) |
| 3232 | { |
| 3233 | /************************************** |
| 3234 | * |
| 3235 | * e n d _ d a t a b a s e |
| 3236 | * |
| 3237 | ************************************** |
| 3238 | * |
| 3239 | * Functional description |
| 3240 | * End a request. |
| 3241 | * |
| 3242 | **************************************/ |
| 3243 | LocalStatus ls; |
| 3244 | CheckStatusWrapper status_vector(&ls); |
| 3245 | |
| 3246 | Rdb* rdb = this->port_context; |
| 3247 | if (bad_db(&status_vector, rdb)) |
| 3248 | return this->send_response(sendL, 0, 0, &status_vector, false); |
| 3249 | |
| 3250 | rdb->rdb_iface->detach(&status_vector); |
| 3251 | |
| 3252 | if (status_vector.getState() & IStatus::STATE_ERRORS) |
| 3253 | return this->send_response(sendL, 0, 0, &status_vector, false); |
| 3254 | |
| 3255 | port_flags |= PORT_detached; |
| 3256 | if (port_async) |
| 3257 | { |
| 3258 | port_async->port_flags |= PORT_detached; |
| 3259 | |
| 3260 | RefMutexGuard portGuard(*port_async->port_sync, FB_FUNCTION); |
| 3261 | while (rdb->rdb_events) |
| 3262 | release_event(rdb->rdb_events); |
| 3263 | } |
| 3264 | |
| 3265 | { // scope |
| 3266 | RefMutexGuard portGuard(*port_cancel_sync, FB_FUNCTION); |
| 3267 | rdb->rdb_iface = NULL; |
| 3268 | } |
| 3269 | |
| 3270 | while (rdb->rdb_requests) |
| 3271 | release_request(rdb->rdb_requests, true); |
| 3272 | |
| 3273 | while (rdb->rdb_sql_requests) |
| 3274 | release_sql_request(rdb->rdb_sql_requests); |
| 3275 | |
| 3276 | while (rdb->rdb_transactions) |
| 3277 | release_transaction(rdb->rdb_transactions); |
| 3278 | |
| 3279 | if (this->port_statement) |
| 3280 | release_statement(&this->port_statement); |
| 3281 | |
| 3282 | return this->send_response(sendL, 0, 0, &status_vector, false); |
| 3283 | } |
| 3284 | |
| 3285 | |
| 3286 | ISC_STATUS rem_port::end_request(P_RLSE * release, PACKET* sendL) |
no test coverage detected