Browse Source

Modifications for usage of new queue code.

1.0.0
Georg Hopp 10 years ago
parent
commit
04b6f18e56
  1. 1
      include/tr/comm_manager.h
  2. 4
      src/cep_write_buffered.c
  3. 2
      src/comm_end_point.c
  4. 2
      src/connector.c
  5. 2
      src/protocol_handler.c

1
include/tr/comm_manager.h

@ -51,4 +51,3 @@ TR_EventDone TR_commManagerShutdown(void *, TR_Event event);
#endif // __TR_COMM_MANAGER_H__
// vim: set ts=4 sw=4:

4
src/cep_write_buffered.c

@ -47,8 +47,6 @@ TR_cepWriteBuffered(TR_CommEndPoint this, size_t * size)
case -1: // FAILURE
case -2: // remote close
TR_delete(data);
TR_queueDestroy(this->write_buffer);
*size = this->write_buffer_size;
break;
default:
@ -71,7 +69,7 @@ TR_cepWriteBuffered(TR_CommEndPoint this, size_t * size)
}
break;
}
if (send <= 0) break;
}

2
src/comm_end_point.c

@ -118,7 +118,7 @@ const char * TR_cepEventStrings[] = {
"TR_CEP_EVENT_SHUT_WRITE",
"TR_CEP_EVENT_CLOSE",
};
intptr_t comm_end_point_events[TR_CEP_EVENT_MAX + 1];
TR_INIT_IFACE(TR_Class, commEndPointCtor, commEndPointDtor, NULL);
TR_INIT_IFACE(TR_CommEndPoint, NULL, NULL);

2
src/connector.c

@ -62,7 +62,7 @@ connectorAccept(void * _this, TR_Event event)
while (socket) {
TR_socketNonblock((TR_Socket)socket);
TR_Connection new_con = TR_new(
TR_Connection,
TR_Connection,
socket,
connection->protocol,
CEP_DEFAULT_READ_SIZE);

2
src/protocol_handler.c

@ -101,7 +101,7 @@ protocolHandlerCompose(void * _this, TR_Event event)
NULL));
}
if (endpoint->write_buffer->nmsg == 1) {
if (TR_queueSize(endpoint->write_buffer) >= 1) {
TR_eventHandlerIssueEvent(
(TR_EventHandler)_this,
TR_eventSubjectEmit(

Loading…
Cancel
Save