Compare commits
No commits in common. "691ebd991ae4e8cd9424cc8e56bebd651e21d509" and "fa87769ed878f1c572d025395a59c4f265b704c0" have entirely different histories.
691ebd991a
...
fa87769ed8
|
@ -732,9 +732,8 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u
|
||||||
resume:
|
resume:
|
||||||
while (pos < bs->journal.block_size)
|
while (pos < bs->journal.block_size)
|
||||||
{
|
{
|
||||||
auto buf_pos = proc_pos - done_pos + pos;
|
journal_entry *je = (journal_entry*)((uint8_t*)buf + proc_pos - done_pos + pos);
|
||||||
journal_entry *je = (journal_entry*)((uint8_t*)buf + buf_pos);
|
if (je->magic != JOURNAL_MAGIC || je_crc32(je) != je->crc32 ||
|
||||||
if (je->magic != JOURNAL_MAGIC || buf_pos+je->size > len || je_crc32(je) != je->crc32 ||
|
|
||||||
je->type < JE_MIN || je->type > JE_MAX || started && je->crc32_prev != crc32_last)
|
je->type < JE_MIN || je->type > JE_MAX || started && je->crc32_prev != crc32_last)
|
||||||
{
|
{
|
||||||
if (pos == 0)
|
if (pos == 0)
|
||||||
|
|
|
@ -135,8 +135,8 @@ void etcd_state_client_t::etcd_call(std::string api, json11::Json payload, int t
|
||||||
{
|
{
|
||||||
if (this->log_level > 0)
|
if (this->log_level > 0)
|
||||||
{
|
{
|
||||||
fprintf(
|
printf(
|
||||||
stderr, "Warning: etcd request failed: %s, retrying %d more times\n",
|
"Warning: etcd request failed: %s, retrying %d more times\n",
|
||||||
err.c_str(), retries
|
err.c_str(), retries
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,7 @@ void etcd_state_client_t::start_etcd_watcher()
|
||||||
etcd_watch_ws = NULL;
|
etcd_watch_ws = NULL;
|
||||||
}
|
}
|
||||||
if (this->log_level > 1)
|
if (this->log_level > 1)
|
||||||
fprintf(stderr, "Trying to connect to etcd websocket at %s\n", etcd_address.c_str());
|
printf("Trying to connect to etcd websocket at %s\n", etcd_address.c_str());
|
||||||
etcd_watch_ws = open_websocket(tfd, etcd_address, etcd_api_path+"/watch", etcd_slow_timeout,
|
etcd_watch_ws = open_websocket(tfd, etcd_address, etcd_api_path+"/watch", etcd_slow_timeout,
|
||||||
[this, cur_addr = selected_etcd_address](const http_response_t *msg)
|
[this, cur_addr = selected_etcd_address](const http_response_t *msg)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue