| 425 | |
| 426 | |
| 427 | ISC_STATUS filter_runtime(USHORT action, BlobControl* control) |
| 428 | { |
| 429 | /************************************** |
| 430 | * |
| 431 | * f i l t e r _ r u n t i m e |
| 432 | * |
| 433 | ************************************** |
| 434 | * |
| 435 | * Functional description |
| 436 | * Get next segment from a relation runtime summary blob. |
| 437 | * |
| 438 | **************************************/ |
| 439 | if (action == isc_blob_filter_close) |
| 440 | return string_filter(action, control); |
| 441 | |
| 442 | // Unless this is a get segment call, just return success |
| 443 | |
| 444 | if (action != isc_blob_filter_get_segment) |
| 445 | return FB_SUCCESS; |
| 446 | |
| 447 | // If there is a string filter active, use it first |
| 448 | |
| 449 | if (control->ctl_data[0]) |
| 450 | { |
| 451 | const ISC_STATUS astatus = string_filter(action, control); |
| 452 | if (astatus != isc_segstr_eof) |
| 453 | return astatus; |
| 454 | string_filter(isc_blob_filter_close, control); |
| 455 | } |
| 456 | |
| 457 | // Loop thru descriptors looking for one with a data type |
| 458 | UCHAR temp[BUFFER_SMALL]; |
| 459 | UCHAR* buff = temp; |
| 460 | const USHORT buff_len = sizeof(temp); |
| 461 | control->ctl_data[3] = 8; |
| 462 | |
| 463 | USHORT length; |
| 464 | const ISC_STATUS status = caller(isc_blob_filter_get_segment, control, buff_len, buff, &length); |
| 465 | |
| 466 | if (status == isc_segment) |
| 467 | return isc_segstr_eof; |
| 468 | |
| 469 | if (status) |
| 470 | return status; |
| 471 | |
| 472 | buff[length] = 0; |
| 473 | UCHAR* p = buff + 1; |
| 474 | USHORT n; |
| 475 | UCHAR* q = (UCHAR*) &n; |
| 476 | q[0] = p[0]; |
| 477 | q[1] = p[1]; |
| 478 | bool blr = false; |
| 479 | |
| 480 | TEXT line[BUFFER_MEDIUM]; |
| 481 | switch ((rsr_t) buff[0]) |
| 482 | { |
| 483 | case RSR_field_name: |
| 484 | sprintf(line, " name: %s", p); |
nothing calls this directly
no test coverage detected