-#define OPUS_WARN "<strong>WARNING:</strong> Your client doesn't support the Opus codec the server is using, you won't be able to talk or hear anyone. Please upgrade"
+#define OPUS_WARN_USING "<strong>WARNING:</strong> Your client doesn't support the Opus codec the server is using, you won't be able to talk or hear anyone. Please upgrade your Mumble client."
+#define OPUS_WARN_SWITCHING "<strong>WARNING:</strong> Your client doesn't support the Opus codec the server is switching to, you won't be able to talk or hear anyone. Please upgrade your Mumble client."
- } else if (bOpus == enableOpus) {
- if (connectingClient && !connectingClient->bOpus) {
- Client_textmessage(client_itr, OPUS_WARN);
- }
+ } else if (bOpus && enableOpus) {
+ if (connectingClient && !connectingClient->bOpus)
+ Client_textmessage(connectingClient, OPUS_WARN_USING);
sendmsg = Msg_create(CodecVersion);
sendmsg->payload.codecVersion->alpha = iCodecAlpha;
sendmsg->payload.codecVersion->beta = iCodecBeta;
sendmsg->payload.codecVersion->prefer_alpha = bPreferAlpha;
sendmsg->payload.codecVersion->has_opus = true;
sendmsg = Msg_create(CodecVersion);
sendmsg->payload.codecVersion->alpha = iCodecAlpha;
sendmsg->payload.codecVersion->beta = iCodecBeta;
sendmsg->payload.codecVersion->prefer_alpha = bPreferAlpha;
sendmsg->payload.codecVersion->has_opus = true;
Client_send_message_except(NULL, sendmsg);
Log_info("CELT codec switch 0x%x 0x%x (prefer 0x%x)", iCodecAlpha, iCodecBeta,
bPreferAlpha ? iCodecAlpha : iCodecBeta);
Client_send_message_except(NULL, sendmsg);
Log_info("CELT codec switch 0x%x 0x%x (prefer 0x%x)", iCodecAlpha, iCodecBeta,
bPreferAlpha ? iCodecAlpha : iCodecBeta);
- client_itr = NULL;
- while (Client_iterate(&client_itr) != NULL) {
- if ((client_itr->authenticated || client_itr == connectingClient) &&
- !client_itr->bOpus) {
- Client_textmessage(client_itr, OPUS_WARN);
+ if (enableOpus && !bOpus) {
+ client_itr = NULL;
+ while (Client_iterate(&client_itr) != NULL) {
+ if ((client_itr->authenticated || client_itr == connectingClient) &&
+ !client_itr->bOpus) {
+ Client_textmessage(client_itr, OPUS_WARN_SWITCHING);
+ }
sendmsg = Msg_create(UserRemove);
sendmsg->payload.userRemove->session = client->sessionId;
Client_send_message_except(client, sendmsg);
sendmsg = Msg_create(UserRemove);
sendmsg->payload.userRemove->session = client->sessionId;
Client_send_message_except(client, sendmsg);
}
list_iterate_safe(itr, save, &client->txMsgQueue) {
list_del(&list_get_entry(itr, message_t, node)->node);
}
list_iterate_safe(itr, save, &client->txMsgQueue) {
list_del(&list_get_entry(itr, message_t, node)->node);
else if (SSLi_get_error(client->ssl, rc) == SSLI_ERROR_ZERO_RETURN ||
SSLi_get_error(client->ssl, rc) == 0) {
Log_info_client(client, "Connection closed by peer");
else if (SSLi_get_error(client->ssl, rc) == SSLI_ERROR_ZERO_RETURN ||
SSLi_get_error(client->ssl, rc) == 0) {
Log_info_client(client, "Connection closed by peer");