From 4b2d9eb0da287e59f146f3b8cfe1be28d3f33397 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Mon, 11 Aug 2014 20:41:02 +0100 Subject: [PATCH] fix some names and adapt to fixed PARENTCALL --- include/tr/comm_manager.h | 1 + src/cep_append_read_data.c | 2 +- src/cep_append_write_data.c | 2 +- src/cep_buffer_read.c | 2 +- src/cep_write_buffered.c | 2 +- src/comm_manager.c | 2 +- src/comm_manager_poll.c | 4 ++-- src/conn_entry_point.c | 4 ++-- src/connection.c | 4 ++-- src/connector.c | 4 ++-- src/io_handler.c | 2 +- src/protocol_handler.c | 2 +- 12 files changed, 16 insertions(+), 15 deletions(-) diff --git a/include/tr/comm_manager.h b/include/tr/comm_manager.h index 9e98816..968e1de 100644 --- a/include/tr/comm_manager.h +++ b/include/tr/comm_manager.h @@ -24,6 +24,7 @@ #define __TR_COMM_MANAGER_H__ #include +#include #include "trbase.h" #include "trevent.h" diff --git a/src/cep_append_read_data.c b/src/cep_append_read_data.c index db2a071..9885d42 100644 --- a/src/cep_append_read_data.c +++ b/src/cep_append_read_data.c @@ -26,7 +26,7 @@ #include "tr/comm_end_point.h" void -cepAppendReadData(TR_CommEndPoint this, TR_RemoteData data) +TR_cepAppendReadData(TR_CommEndPoint this, TR_RemoteData data) { TR_queuePut(this->read_buffer, data); } diff --git a/src/cep_append_write_data.c b/src/cep_append_write_data.c index 839329a..c4d5964 100644 --- a/src/cep_append_write_data.c +++ b/src/cep_append_write_data.c @@ -26,7 +26,7 @@ #include "tr/comm_end_point.h" void -cepAppendWriteData(TR_CommEndPoint this, TR_RemoteData data) +TR_cepAppendWriteData(TR_CommEndPoint this, TR_RemoteData data) { TR_queuePut(this->write_buffer, data); } diff --git a/src/cep_buffer_read.c b/src/cep_buffer_read.c index 2a07654..fa81a15 100644 --- a/src/cep_buffer_read.c +++ b/src/cep_buffer_read.c @@ -26,7 +26,7 @@ #include "tr/comm_end_point.h" int -cepBufferedRead(TR_CommEndPoint this) +TR_cepBufferRead(TR_CommEndPoint this) { TR_RemoteData data = TR_socketRecv(this->transport, this->read_chunk_size); diff --git a/src/cep_write_buffered.c b/src/cep_write_buffered.c index f124712..bed3920 100644 --- a/src/cep_write_buffered.c +++ b/src/cep_write_buffered.c @@ -26,7 +26,7 @@ #include "tr/comm_end_point.h" int -cepWriteBuffered(TR_CommEndPoint this) +TR_cepWriteBuffered(TR_CommEndPoint this) { TR_RemoteData data = TR_cepNextWriteData(this); int send = 0; diff --git a/src/comm_manager.c b/src/comm_manager.c index 189f831..72bf4e1 100644 --- a/src/comm_manager.c +++ b/src/comm_manager.c @@ -37,7 +37,7 @@ commManagerCtor(void * _this, va_list * params) { TR_CommManager this = _this; - TR_PARENTCALL(_this, TR_Class, ctor, params); + TR_PARENTCALL(TR_CommManager, _this, TR_Class, ctor, params); this->n_endpoints = sysconf(_SC_OPEN_MAX); this->endpoints = TR_calloc(sizeof(TR_CommEndPoint), this->n_endpoints); diff --git a/src/comm_manager_poll.c b/src/comm_manager_poll.c index 154e790..99bfcb4 100644 --- a/src/comm_manager_poll.c +++ b/src/comm_manager_poll.c @@ -41,7 +41,7 @@ commManagerPollCtor(void * _this, va_list * params) TR_CommManager cmgr = _this; nfds_t i; - TR_PARENTCALL(_this, TR_Class, ctor, params); + TR_PARENTCALL(TR_CommManagerPoll, _this, TR_Class, ctor, params); this->fds = TR_malloc(sizeof(struct pollfd) * cmgr->n_endpoints); for (i = 0; i < cmgr->n_endpoints; i++) { this->fds[i].fd = -1; @@ -59,7 +59,7 @@ commManagerPollDtor(void * _this) TR_CommManagerPoll this = _this; TR_MEM_FREE(this->fds); - TR_PARENTCALL(_this, TR_Class, dtor); + TR_PARENTCALL(TR_CommManagerPoll, _this, TR_Class, dtor); } static diff --git a/src/conn_entry_point.c b/src/conn_entry_point.c index f2f4367..9f853f2 100644 --- a/src/conn_entry_point.c +++ b/src/conn_entry_point.c @@ -36,7 +36,7 @@ static int connEntryPointCtor(void * _this, va_list * params) { - TR_PARENTCALL(_this, TR_Class, ctor, params); + TR_PARENTCALL(TR_ConnEntryPoint, _this, TR_Class, ctor, params); return 0; } @@ -44,7 +44,7 @@ static void connEntryPointDtor(void * _this) { - TR_PARENTCALL(_this, TR_Class, dtor); + TR_PARENTCALL(TR_ConnEntryPoint, _this, TR_Class, dtor); } static diff --git a/src/connection.c b/src/connection.c index 589621c..16c2458 100644 --- a/src/connection.c +++ b/src/connection.c @@ -39,7 +39,7 @@ connectionCtor(void * _this, va_list * params) { TR_Connection this = _this; - TR_PARENTCALL(_this, TR_Class, ctor, params); + TR_PARENTCALL(TR_Connection, _this, TR_Class, ctor, params); this->current_message = NULL; return 0; @@ -52,7 +52,7 @@ connectionDtor(void * _this) TR_Connection this = _this; TR_delete(this->current_message); - TR_PARENTCALL(_this, TR_Class, dtor); + TR_PARENTCALL(TR_Connection, _this, TR_Class, dtor); } static diff --git a/src/connector.c b/src/connector.c index 93dbbdf..679541a 100644 --- a/src/connector.c +++ b/src/connector.c @@ -37,7 +37,7 @@ static int connectorCtor(void * _this, va_list * params) { - TR_PARENTCALL(_this, TR_Class, ctor, params); + TR_PARENTCALL(TR_Connector, _this, TR_Class, ctor, params); return 0; } @@ -45,7 +45,7 @@ static void connectorDtor(void * _this) { - TR_PARENTCALL(_this, TR_Class, dtor); + TR_PARENTCALL(TR_Connector, _this, TR_Class, dtor); } static diff --git a/src/io_handler.c b/src/io_handler.c index ae90d9c..8459247 100644 --- a/src/io_handler.c +++ b/src/io_handler.c @@ -33,7 +33,7 @@ static int ioHandlerCtor(void * _this, va_list * params) { - TR_PARENTCALL(_this, TR_Class, ctor, params); + TR_PARENTCALL(TR_IoHandler, _this, TR_Class, ctor, params); return 0; } diff --git a/src/protocol_handler.c b/src/protocol_handler.c index fb4bdc2..88651c9 100644 --- a/src/protocol_handler.c +++ b/src/protocol_handler.c @@ -36,7 +36,7 @@ static int protocolHandlerCtor(void * _this, va_list * params) { - TR_PARENTCALL(_this, TR_Class, ctor, params); + TR_PARENTCALL(TR_ProtocolHandler, _this, TR_Class, ctor, params); return 0; }