| 1041 | |
| 1042 | |
| 1043 | ISC_STATUS Service::query2(thread_db* /*tdbb*/, |
| 1044 | USHORT send_item_length, |
| 1045 | const UCHAR* send_items, |
| 1046 | USHORT recv_item_length, |
| 1047 | const UCHAR* recv_items, |
| 1048 | USHORT buffer_length, |
| 1049 | UCHAR* info) |
| 1050 | { |
| 1051 | ExistenceGuard guard(this, FB_FUNCTION); |
| 1052 | |
| 1053 | if (svc_flags & SVC_detached) |
| 1054 | { |
| 1055 | // Service was already detached |
| 1056 | Arg::Gds(isc_bad_svc_handle).raise(); |
| 1057 | } |
| 1058 | |
| 1059 | UCHAR item; |
| 1060 | UCHAR buffer[MAXPATHLEN]; |
| 1061 | USHORT l, length, get_flags; |
| 1062 | UCHAR* stdin_request_notification = NULL; |
| 1063 | |
| 1064 | // Setup the status vector |
| 1065 | Arg::StatusVector status; |
| 1066 | |
| 1067 | ULONG requestFromPut = 0; |
| 1068 | |
| 1069 | try |
| 1070 | { |
| 1071 | // Process the send portion of the query first. |
| 1072 | USHORT timeout = 0; |
| 1073 | const UCHAR* items = send_items; |
| 1074 | const UCHAR* const end_items = items + send_item_length; |
| 1075 | |
| 1076 | while (items < end_items && *items != isc_info_end) |
| 1077 | { |
| 1078 | switch ((item = *items++)) |
| 1079 | { |
| 1080 | case isc_info_end: |
| 1081 | break; |
| 1082 | |
| 1083 | default: |
| 1084 | if (items + 2 <= end_items) |
| 1085 | { |
| 1086 | l = (USHORT) gds__vax_integer(items, 2); |
| 1087 | items += 2; |
| 1088 | if (items + l <= end_items) |
| 1089 | { |
| 1090 | switch (item) |
| 1091 | { |
| 1092 | case isc_info_svc_line: |
| 1093 | requestFromPut = put(items, l); |
| 1094 | break; |
| 1095 | case isc_info_svc_message: |
| 1096 | //put(items - 3, l + 3); |
| 1097 | break; |
| 1098 | case isc_info_svc_timeout: |
| 1099 | timeout = (USHORT) gds__vax_integer(items, l); |
| 1100 | break; |
no test coverage detected