diff --git a/xwords4/relay/dbmgr.cpp b/xwords4/relay/dbmgr.cpp index 75246fef1..71014f8e3 100644 --- a/xwords4/relay/dbmgr.cpp +++ b/xwords4/relay/dbmgr.cpp @@ -62,8 +62,9 @@ DBMgr::Get() DBMgr::DBMgr() { - logf( XW_LOGINFO, "%s called", __func__ ); - m_useB64 = false; + int tmp; + RelayConfigs::GetConfigs()->GetValueFor( "USE_B64", &tmp ); + m_useB64 = tmp != 0; pthread_key_create( &m_conn_key, destr_function ); diff --git a/xwords4/relay/xwrelay.conf_tmplate b/xwords4/relay/xwrelay.conf_tmplate index 27d79ec06..66d455a6b 100644 --- a/xwords4/relay/xwrelay.conf_tmplate +++ b/xwords4/relay/xwrelay.conf_tmplate @@ -63,3 +63,8 @@ LOGFILE_PATH=./xwrelay.log # Delay sending packets so devices/emulators on the same machine as # relay have a bit more natural experience # SEND_DELAY_MILLIS=500 + +# Use base64 encoding rather than PQescapeByteaConn for stored +# messages. The latter doesn't seem as reliable with newer psql +# servers. Anything but 0 is treated as true. +USE_B64=1