Commit 04b6f18e5694329a34c9431a999436961bc15609

Authored by Georg Hopp
1 parent 88292e38

Modifications for usage of new queue code.

... ... @@ -51,4 +51,3 @@ TR_EventDone TR_commManagerShutdown(void *, TR_Event event);
51 51 #endif // __TR_COMM_MANAGER_H__
52 52
53 53 // vim: set ts=4 sw=4:
54   -
... ...
... ... @@ -47,8 +47,6 @@ TR_cepWriteBuffered(TR_CommEndPoint this, size_t * size)
47 47 case -1: // FAILURE
48 48 case -2: // remote close
49 49 TR_delete(data);
50   - TR_queueDestroy(this->write_buffer);
51   - *size = this->write_buffer_size;
52 50 break;
53 51
54 52 default:
... ... @@ -71,7 +69,7 @@ TR_cepWriteBuffered(TR_CommEndPoint this, size_t * size)
71 69 }
72 70 break;
73 71 }
74   -
  72 +
75 73 if (send <= 0) break;
76 74 }
77 75
... ...
... ... @@ -118,7 +118,7 @@ const char * TR_cepEventStrings[] = {
118 118 "TR_CEP_EVENT_SHUT_WRITE",
119 119 "TR_CEP_EVENT_CLOSE",
120 120 };
121   -
  121 +
122 122 intptr_t comm_end_point_events[TR_CEP_EVENT_MAX + 1];
123 123 TR_INIT_IFACE(TR_Class, commEndPointCtor, commEndPointDtor, NULL);
124 124 TR_INIT_IFACE(TR_CommEndPoint, NULL, NULL);
... ...
... ... @@ -62,7 +62,7 @@ connectorAccept(void * _this, TR_Event event)
62 62 while (socket) {
63 63 TR_socketNonblock((TR_Socket)socket);
64 64 TR_Connection new_con = TR_new(
65   - TR_Connection,
  65 + TR_Connection,
66 66 socket,
67 67 connection->protocol,
68 68 CEP_DEFAULT_READ_SIZE);
... ...
... ... @@ -101,7 +101,7 @@ protocolHandlerCompose(void * _this, TR_Event event)
101 101 NULL));
102 102 }
103 103
104   - if (endpoint->write_buffer->nmsg == 1) {
  104 + if (TR_queueSize(endpoint->write_buffer) >= 1) {
105 105 TR_eventHandlerIssueEvent(
106 106 (TR_EventHandler)_this,
107 107 TR_eventSubjectEmit(
... ...
Please register or login to post a comment