diff --git a/src/XMPPSRVEnumerator.h b/src/XMPPSRVEnumerator.h index c8d1d5b..d6b904b 100644 --- a/src/XMPPSRVEnumerator.h +++ b/src/XMPPSRVEnumerator.h @@ -28,7 +28,8 @@ @interface XMPPSRVEntry: OFObject { uint16_t priority; - uint16_t weight, accumulatedWeight; + uint16_t weight; + uint32_t accumulatedWeight; uint16_t port; OFString *target; } @@ -36,7 +37,7 @@ #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 @@ -55,6 +56,8 @@ handle: (ns_msg)handle; - (uint16_t)priority; - (uint16_t)weight; +- (uint32_t)accumulatedWeight; +- (void)setAccumulatedWeight: (uint32_t)accumulatedWeight; - (uint16_t)port; - (OFString*)target; @end diff --git a/src/XMPPSRVEnumerator.m b/src/XMPPSRVEnumerator.m index 2ffb7ea..ad6e4e2 100644 --- a/src/XMPPSRVEnumerator.m +++ b/src/XMPPSRVEnumerator.m @@ -132,12 +132,12 @@ return weight; } -- (void)setAccumulatedWeight: (uint16_t)accumulatedWeight_ +- (void)setAccumulatedWeight: (uint32_t)accumulatedWeight_ { accumulatedWeight = accumulatedWeight_; } -- (uint16_t)accumulatedWeight +- (uint32_t)accumulatedWeight { return accumulatedWeight; } @@ -326,7 +326,7 @@ return nil; if (listIter == NULL) - listIter = [list lastListObject]; + listIter = [list firstListObject]; if (listIter == NULL) return nil; @@ -362,7 +362,7 @@ [subListCopy release]; subListCopy = nil; - listIter = listIter->previous; + listIter = listIter->next; if (listIter == NULL) done = YES;