diff --git a/src/control_socket.cpp b/src/control_socket.cpp index d95cf4d1b..7a9c3936b 100644 --- a/src/control_socket.cpp +++ b/src/control_socket.cpp @@ -337,6 +337,16 @@ static int process_msg(struct control_state *s, fd_t client_fd, char *message, s while (isspace(message[0]) && message[0] != '\0') message++; } + + /* "port n compress" messages get forwarded to + * port[n].sender.compress, but that is wrong, because frames + * are now compressed before they are passed to the sender + * (sender compression is now always set to "none"). + */ + if (prefix_matches(message, "compress ")){ + log_msg(LOG_LEVEL_ERROR, "\"port n compress\" was deprecated. Use \"port[n] compress\" instead\n"); + return ret; + } } if(strcasecmp(message, "quit") == 0) { diff --git a/src/hd-rum-translator/hd-rum-translator.cpp b/src/hd-rum-translator/hd-rum-translator.cpp index 0f2015379..c351fd233 100644 --- a/src/hd-rum-translator/hd-rum-translator.cpp +++ b/src/hd-rum-translator/hd-rum-translator.cpp @@ -287,8 +287,8 @@ static struct response *change_replica_type(struct hd_rum_translator_state *s, return new_response(RESPONSE_BAD_REQUEST, NULL); } - recompress_port_set_active(s->recompress, index, - r->type == replica::type_t::RECOMPRESS); + recompress_port_set_active(s->recompress, index, + r->type == replica::type_t::RECOMPRESS); return new_response(RESPONSE_OK, NULL); } @@ -855,7 +855,7 @@ int main(int argc, char **argv) params.hosts[i].addr); EXIT(EXIT_FAILURE); } - assert(idx == i); + assert(idx == i); recompress_port_set_active(state.recompress, i, false); } else { state.replicas[i]->type = replica::type_t::RECOMPRESS; @@ -868,7 +868,7 @@ int main(int argc, char **argv) params.hosts[i].addr); EXIT(EXIT_FAILURE); } - assert(idx == i); + assert(idx == i); // we don't care about this clients, we only tell recompressor to // take care about them recompress_port_set_active(state.recompress, i, true);