| 1187 | { |
| 1188 | memcpy(item.data.Data(), (const char*)msg->getData() + sizeof(unsigned32), item.data.Size()); |
| 1189 | } |
| 1190 | _client->leaveRcv(); |
| 1191 | } |
| 1192 | break; |
| 1193 | } |
| 1194 | |
| 1195 | return nsNoMoreCallbacks; |
| 1196 | } |
| 1197 | |
| 1198 | // process regular (user) message: |
| 1199 | #ifdef NET_LOG_CLIENT_RECEIVE |
| 1200 | NetLog("Channel(%u)::clientReceive: received user message (len=%3u, serial=%4u, flags=%04x, ID=%x)", |
| 1201 | channel->getChannelId(), len, msg->getSerial(), flags, msg->id); |
| 1202 | #endif |
| 1203 | _client->enterRcv(); |
| 1204 | // merge partial messages: |
| 1205 | if (flags & MSG_PART_FLAG) |
| 1206 | { |
| 1207 | bool closing = (flags & MSG_CLOSING_FLAG) > 0; |
| 1208 | if (flags & MSG_URGENT_FLAG) |
| 1209 | { |
| 1210 | if (closing) |
| 1211 | { // the last message-part to be merged.. |
| 1212 | NET_ERROR(_client->splitUrgent.NotNull()); |
| 1213 | _client->lastSplitUrgent->next = msg; |
| 1214 | msg->next = nullptr; |
| 1215 | msg = mergeMessageList(_client->splitUrgent); |
| 1216 | _client->splitUrgent = nullptr; |
| 1217 | } |
| 1218 | else |
| 1219 | { // another message-part => remember it! |
| 1220 | if (!_client->splitUrgent) |
| 1221 | { |
| 1222 | _client->splitUrgent = msg; |
| 1223 | } |
| 1224 | else |
| 1225 | { |
| 1226 | _client->lastSplitUrgent->next = msg; |
| 1227 | } |
| 1228 | (_client->lastSplitUrgent = msg)->next = nullptr; |
| 1229 | _client->leaveRcv(); |
| 1230 | return nsNoMoreCallbacks; |
| 1231 | } |
| 1232 | } |
| 1233 | else if (closing) |
| 1234 | { // the last message-part to be merged.. |
| 1235 | NET_ERROR(_client->split.NotNull()); |
| 1236 | _client->lastSplit->next = msg; |
| 1237 | msg->next = nullptr; |
| 1238 | msg = mergeMessageList(_client->split); |
| 1239 | _client->split = nullptr; |
| 1240 | } |
| 1241 | else |
| 1242 | { // another message-part => remember it! |
| 1243 | if (!_client->split) |
| 1244 | { |
| 1245 | _client->split = msg; |
| 1246 | } |
nothing calls this directly
no test coverage detected