Index: src/XMPPSRVEnumerator.h ================================================================== --- src/XMPPSRVEnumerator.h +++ src/XMPPSRVEnumerator.h @@ -26,19 +26,20 @@ #import @interface XMPPSRVEntry: OFObject { uint16_t priority; - uint16_t weight, accumulatedWeight; + uint16_t weight; + uint32_t accumulatedWeight; uint16_t port; OFString *target; } #ifdef OF_HAVE_PROPERTIES @property (readonly, assign) uint16_t priority; @property (readonly, assign) uint16_t weight; -@property (assign) uint16_t accumulatedWeight; +@property (assign) uint32_t accumulatedWeight; @property (readonly, assign) uint16_t port; @property (readonly, copy) OFString *target; #endif + entryWithPriority: (uint16_t)priority @@ -53,10 +54,12 @@ target: (OFString*)target; - initWithResourceRecord: (ns_rr)resourceRecord handle: (ns_msg)handle; - (uint16_t)priority; - (uint16_t)weight; +- (uint32_t)accumulatedWeight; +- (void)setAccumulatedWeight: (uint32_t)accumulatedWeight; - (uint16_t)port; - (OFString*)target; @end @interface XMPPSRVEnumerator: OFEnumerator Index: src/XMPPSRVEnumerator.m ================================================================== --- src/XMPPSRVEnumerator.m +++ src/XMPPSRVEnumerator.m @@ -130,16 +130,16 @@ - (uint16_t)weight { return weight; } -- (void)setAccumulatedWeight: (uint16_t)accumulatedWeight_ +- (void)setAccumulatedWeight: (uint32_t)accumulatedWeight_ { accumulatedWeight = accumulatedWeight_; } -- (uint16_t)accumulatedWeight +- (uint32_t)accumulatedWeight { return accumulatedWeight; } - (uint16_t)port @@ -324,11 +324,11 @@ if (done) return nil; if (listIter == NULL) - listIter = [list lastListObject]; + listIter = [list firstListObject]; if (listIter == NULL) return nil; if (subListCopy == nil) @@ -360,11 +360,11 @@ if ([subListCopy count] == 0) { [subListCopy release]; subListCopy = nil; - listIter = listIter->previous; + listIter = listIter->next; if (listIter == NULL) done = YES; }