Commit 04b6f18e5694329a34c9431a999436961bc15609
1 parent
88292e38
Modifications for usage of new queue code.
Showing
5 changed files
with
4 additions
and
7 deletions
... | ... | @@ -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); | ... | ... |
... | ... | @@ -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