Differences From Artifact [f3a2775abf]:
- File
src/XMPPSRVEnumerator.m
— part of check-in
[e240aaaf2a]
at
2011-05-25 22:41:26
on branch trunk
— Get rid of an unnecessary loop.
The loop is not required as we recalculate each entry's
accumulatedWeight on each call, thus there is always an entry that will
be found for the random number. (user: js, size: 8255) [annotate] [blame] [check-ins using]
To Artifact [f3533e40c3]:
- File src/XMPPSRVEnumerator.m — part of check-in [c7b3eed29f] at 2011-05-26 16:38:37 on branch trunk — Fix accumulatedWeight and iterate priorities in the right order. (user: js, size: 8252) [annotate] [blame] [check-ins using]
︙ | |||
128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + - + | } - (uint16_t)weight { return weight; } |
︙ | |||
322 323 324 325 326 327 328 | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | - + | of_list_object_t *iter; uint32_t totalWeight = 0; if (done) return nil; if (listIter == NULL) |
︙ | |||
358 359 360 361 362 363 364 | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | - + | } } if ([subListCopy count] == 0) { [subListCopy release]; subListCopy = nil; |
︙ |