Skip to content

Commit da61f02

Browse files
committed
exmdb_client: add back special localhost handling for homeserver 0
Fixes: gromox-3.4-156-g2a748fee3
1 parent 5a07f18 commit da61f02

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

exch/exmdb/parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static bool exmdb_parser_is_local(const char *prefix, bool *pvt)
103103
mlog(LV_ERR, "%s: %s: %s", __func__, prefix, strerror(err));
104104
return false;
105105
}
106-
if (hostname == g_host_id)
106+
if (hostname == g_host_id || hostname.empty())
107107
return true;
108108
mlog(LV_DEBUG, "exmdb: is_local: %s not served here (%s) (but at %s)",
109109
prefix, g_host_id.c_str(), hostname.c_str());

lib/exmdb_client.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ static remote_conn_ref exmdb_client_get_connection(const char *dir)
482482
mlog(LV_ERR, "exmdb_client: cannot find remote server for %s", dir);
483483
return fc;
484484
}
485+
if (itm.host.empty())
486+
itm.host = "localhost";
485487
itm.type = is_pvt ? remote_svr::EXMDB_PRIVATE : remote_svr::EXMDB_PUBLIC;
486488
sv_hold.lock();
487489
mdcl_server_list.emplace_back(std::move(itm));

0 commit comments

Comments
 (0)