diff --git a/src/Cedar/Admin.c b/src/Cedar/Admin.c index 7b06a716..680f3a93 100644 --- a/src/Cedar/Admin.c +++ b/src/Cedar/Admin.c @@ -13489,7 +13489,7 @@ UINT AdminAccept(CONNECTION *c, PACK *p) else { // Hub admin mode - if (cedar->Server != NULL && cedar->Server->ServerType == SERVER_TYPE_FARM_MEMBER) + if (server != NULL && server->ServerType == SERVER_TYPE_FARM_MEMBER) { // Connection with hub admin mode to cluster member is not permitted return ERR_NOT_ENOUGH_RIGHT; diff --git a/src/Cedar/Hub.c b/src/Cedar/Hub.c index 82e00ff7..d5385b3a 100644 --- a/src/Cedar/Hub.c +++ b/src/Cedar/Hub.c @@ -5514,7 +5514,7 @@ void StorePacketToHubPa(HUB_PA *dest, SESSION *src, void *data, UINT size, PKT * } } - if (dest != NULL && src != NULL && dest->Session != NULL && src->Hub != NULL && src->Hub->Option != NULL) + if (src != NULL && dest->Session != NULL && src->Hub != NULL && src->Hub->Option != NULL) { if (dest->Session->AdjustMss != 0 || (dest->Session->IsUsingUdpAcceleration && dest->Session->UdpAccelMss != 0) || diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c index 5421f897..7e552d94 100644 --- a/src/Cedar/Protocol.c +++ b/src/Cedar/Protocol.c @@ -5234,7 +5234,7 @@ REDIRECTED: sess->EnableBulkOnRUDP = false; sess->EnableHMacOnBulkOfRUDP = false; - if (s != NULL && s->IsRUDPSocket && s->BulkRecvKey != NULL && s->BulkSendKey != NULL) + if (s->IsRUDPSocket && s->BulkRecvKey != NULL && s->BulkSendKey != NULL) { // Bulk transfer on R-UDP if (PackGetBool(p, "enable_bulk_on_rudp")) diff --git a/src/Cedar/SM.c b/src/Cedar/SM.c index e5ef35ab..f5a6395b 100644 --- a/src/Cedar/SM.c +++ b/src/Cedar/SM.c @@ -18452,38 +18452,35 @@ void SmServerDlgRefresh(HWND hWnd, SM_SERVER *p) } // Listener list update - if (p != NULL) + RPC_LISTENER_LIST t; + Zero(&t, sizeof(RPC_LISTENER_LIST)); + if (CALL(hWnd, ScEnumListener(p->Rpc, &t))) { - RPC_LISTENER_LIST t; - Zero(&t, sizeof(RPC_LISTENER_LIST)); - if (CALL(hWnd, ScEnumListener(p->Rpc, &t))) + LVB *b = LvInsertStart(); + for (i = 0;i < t.NumPort;i++) { - LVB *b = LvInsertStart(); - for (i = 0;i < t.NumPort;i++) + wchar_t tmp[MAX_SIZE]; + wchar_t *status; + UINT icon; + UniFormat(tmp, sizeof(tmp), _UU("CM_LISTENER_TCP_PORT"), t.Ports[i]); + + status = _UU("CM_LISTENER_ONLINE"); + icon = ICO_PROTOCOL; + if (t.Errors[i]) { - wchar_t tmp[MAX_SIZE]; - wchar_t *status; - UINT icon; - UniFormat(tmp, sizeof(tmp), _UU("CM_LISTENER_TCP_PORT"), t.Ports[i]); - - status = _UU("CM_LISTENER_ONLINE"); - icon = ICO_PROTOCOL; - if (t.Errors[i]) - { - status = _UU("CM_LISTENER_ERROR"); - icon = ICO_PROTOCOL_X; - } - else if (t.Enables[i] == false) - { - status = _UU("CM_LISTENER_OFFLINE"); - icon = ICO_PROTOCOL_OFFLINE; - } - - LvInsertAdd(b, icon, (void *)t.Ports[i], 2, tmp, status); + status = _UU("CM_LISTENER_ERROR"); + icon = ICO_PROTOCOL_X; } - LvInsertEnd(b, hWnd, L_LISTENER); - FreeRpcListenerList(&t); + else if (t.Enables[i] == false) + { + status = _UU("CM_LISTENER_OFFLINE"); + icon = ICO_PROTOCOL_OFFLINE; + } + + LvInsertAdd(b, icon, (void *)t.Ports[i], 2, tmp, status); } + LvInsertEnd(b, hWnd, L_LISTENER); + FreeRpcListenerList(&t); } // Get the DDNS client state