From 160bb7832d262286ff9687747a017c716143bda0 Mon Sep 17 00:00:00 2001 From: stefanocasazza Date: Fri, 20 Sep 2019 13:54:44 +0200 Subject: [PATCH] fix --- src/ulib/net/client/redis.cpp | 4 ++-- src/ulib/net/server/server.cpp | 6 +++++- tests/examples/TSA/tsaserial | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ulib/net/client/redis.cpp b/src/ulib/net/client/redis.cpp index f3cbcf5a..a6c792cc 100644 --- a/src/ulib/net/client/redis.cpp +++ b/src/ulib/net/client/redis.cpp @@ -710,7 +710,7 @@ bool UREDISClusterMaster::clusterUnsubscribe(const UString& channel) // unregist { U_TRACE(0, "UREDISClusterMaster::clusterUnsubscribe(%V)", channel.rep) - if (subscriptionClient->sendRequest(U_CONSTANT_TO_PARAM("UNSUBSCRIBE "), channel)) + if (subscriptionClient->processRequest(U_RC_MULTIBULK, U_CONSTANT_TO_PARAM("UNSUBSCRIBE"), U_STRING_TO_PARAM(channel))) { (void)subscriptionClient->UREDISClient_Base::pchannelCallbackMap->erase(channel); @@ -724,7 +724,7 @@ bool UREDISClusterMaster::clusterSubscribe(const UString& channel, vPFcscs callb { U_TRACE(0, "UREDISClusterMaster::clusterSubscribe(%V,%p)", channel.rep, callback) - if (subscriptionClient->sendRequest(U_CONSTANT_TO_PARAM("SUBSCRIBE "), channel)) + if (subscriptionClient->processRequest(U_RC_MULTIBULK, U_CONSTANT_TO_PARAM("SUBSCRIBE"), U_STRING_TO_PARAM(channel))) { subscriptionClient->UREDISClient_Base::pchannelCallbackMap->insert(channel, (const void*)callback); diff --git a/src/ulib/net/server/server.cpp b/src/ulib/net/server/server.cpp index 7fd42ee1..bdaacece 100644 --- a/src/ulib/net/server/server.cpp +++ b/src/ulib/net/server/server.cpp @@ -2414,7 +2414,11 @@ void UServer_Base::loadConfigParam() if (budp == false) #endif { - if (setDocumentRoot(pcfg->at(U_CONSTANT_TO_PARAM("DOCUMENT_ROOT"))) == false) U_ERROR("Setting DOCUMENT ROOT to %V failed", document_root->rep); + x = pcfg->at(U_CONSTANT_TO_PARAM("DOCUMENT_ROOT")); + + if (x.empty()) x = U_STRING_FROM_CONSTANT("/var/www"); + + if (setDocumentRoot(x) == false) U_ERROR("Setting DOCUMENT ROOT to %V failed", document_root->rep); } #ifndef U_LOG_DISABLE diff --git a/tests/examples/TSA/tsaserial b/tests/examples/TSA/tsaserial index 06fb1f7b..6feef0f2 100644 --- a/tests/examples/TSA/tsaserial +++ b/tests/examples/TSA/tsaserial @@ -1 +1 @@ -0619 +0620