| 356 | } |
| 357 | |
| 358 | int |
| 359 | SessionData::write_transaction_to_disk(std::string_view content) |
| 360 | { |
| 361 | const std::lock_guard<std::recursive_mutex> _(disk_io_mutex); |
| 362 | |
| 363 | int result = TS_SUCCESS; |
| 364 | if (has_written_first_transaction) { |
| 365 | // Prepend a comma. |
| 366 | std::string with_comma; |
| 367 | with_comma.reserve(content.size() + 1); |
| 368 | with_comma.push_back(','); |
| 369 | with_comma.append(content); |
| 370 | result = write_to_disk_no_lock(with_comma); |
| 371 | } else { |
| 372 | result = write_to_disk_no_lock(content); |
| 373 | has_written_first_transaction = true; |
| 374 | } |
| 375 | return result; |
| 376 | } |
| 377 | |
| 378 | std::string |
| 379 | SessionData::get_http_version_in_client_stack() const |
no test coverage detected