From 8180119937fa9305ad419b8fa5045ca72cc8e067 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Sat, 9 Aug 2014 18:24:35 +0100 Subject: [PATCH] add connector --- include/Makefile.am | 1 + include/trcomm.h | 1 + src/Makefile.am | 1 + src/comm_end_point.c | 3 ++- src/connection.c | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/Makefile.am b/include/Makefile.am index 1122b24..49a1500 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,6 +1,7 @@ nobase_include_HEADERS = trcomm.h \ tr/comm_end_point.h \ tr/connection.h \ + tr/connector.h \ tr/protocol.h \ tr/proto_message.h \ tr/protocol/raw.h \ diff --git a/include/trcomm.h b/include/trcomm.h index e30c990..368d82a 100644 --- a/include/trcomm.h +++ b/include/trcomm.h @@ -3,6 +3,7 @@ #include "tr/comm_end_point.h" #include "tr/connection.h" +#include "tr/connector.h" #include "tr/protocol.h" #include "tr/proto_message.h" #include "tr/protocol/raw.h" diff --git a/src/Makefile.am b/src/Makefile.am index 9879d3f..259eaf1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,6 +5,7 @@ AM_CFLAGS += -I../include/ TRCOMM = comm_end_point.c \ connection.c \ + connector.c \ protocol.c \ proto_message.c \ protocol_raw.c \ diff --git a/src/comm_end_point.c b/src/comm_end_point.c index 10def76..b016675 100644 --- a/src/comm_end_point.c +++ b/src/comm_end_point.c @@ -29,6 +29,7 @@ #include "trio.h" #include "tr/comm_end_point.h" +#include "tr/protocol.h" #include "tr/interface/comm_end_point.h" static @@ -38,7 +39,7 @@ commEndPointCtor(void * _this, va_list * params) TR_CommEndPoint this = _this; this->transport = va_arg(*params, TR_Socket); - this->protocol = va_arg(*params, void *); + this->protocol = va_arg(*params, TR_Protocol); this->read_chunk_size = va_arg(*params, int); this->do_close = 0; this->read_buffer = TR_new(TR_Queue); diff --git a/src/connection.c b/src/connection.c index 9a54654..6a8d10e 100644 --- a/src/connection.c +++ b/src/connection.c @@ -52,6 +52,7 @@ connectionDtor(void * _this) TR_Connection this = _this; TR_delete(this->current_message); + TR_PARENTCALL(_this, TR_Class, dtor); } static