used to inject a negative reply in behalf of a certian T branch; as it is * a non-200OK reply, it cannot lead to a cancelling scenario */
| 247 | /* used to inject a negative reply in behalf of a certian T branch; as it is |
| 248 | * a non-200OK reply, it cannot lead to a cancelling scenario */ |
| 249 | static void fake_reply(struct cell *t, int branch, int code ) |
| 250 | { |
| 251 | branch_bm_t cancel_bitmap = BRANCH_BM_ZERO; |
| 252 | enum rps reply_status; |
| 253 | |
| 254 | _tm_branch_index = branch; |
| 255 | if ( is_local(t) ) { |
| 256 | reply_status=local_reply( t, FAKED_REPLY, branch, |
| 257 | code, cancel_bitmap ); |
| 258 | if (reply_status==RPS_COMPLETED) { |
| 259 | put_on_wait(t); |
| 260 | } |
| 261 | } else { |
| 262 | reply_status=relay_reply( t, FAKED_REPLY, branch, code, |
| 263 | cancel_bitmap ); |
| 264 | } |
| 265 | _tm_branch_index = 0; |
| 266 | /* again, a final negative reply on a branch will never lead to a |
| 267 | * situation to cancel other existing branches, so the |
| 268 | * cancel_bitmap should be empty here (we use it as a dummy holder), so |
| 269 | * no need trigger an UACs cancelling |
| 270 | */ |
| 271 | } |
| 272 | |
| 273 | |
| 274 |
no test coverage detected