Index: src/XMPPAuthenticator.m ================================================================== --- src/XMPPAuthenticator.m +++ src/XMPPAuthenticator.m @@ -39,13 +39,18 @@ authcid: (OFString*)authcid_ password: (OFString*)password_ { self = [super init]; - [self setAuthzid: authzid_]; - [self setAuthcid: authcid_]; - [self setPassword: password_]; + @try { + authzid = [authzid_ copy]; + authcid = [authcid_ copy]; + password = [password_ copy]; + } @catch (id e) { + [self release]; + @throw e; + } return self; } - (void)dealloc @@ -57,42 +62,36 @@ [super dealloc]; } - (void)setAuthzid: (OFString*)authzid_ { - OFString *old = authzid; - authzid = [authzid_ copy]; - [old release]; + OF_SETTER(authzid, authzid_, YES, YES) } - (OFString*)authzid { - return [[authzid copy] autorelease]; + OF_GETTER(authzid, YES) } - (void)setAuthcid: (OFString*)authcid_ { - OFString *old = authcid; - authcid = [authcid_ copy]; - [old release]; + OF_SETTER(authcid, authcid_, YES, YES) } - (OFString*)authcid { - return [[authcid copy] autorelease]; + OF_GETTER(authcid, YES) } - (void)setPassword: (OFString*)password_ { - OFString *old = password; - password = [password_ copy]; - [old release]; + OF_SETTER(password, password_, YES, YES) } - (OFString*)password { - return [[password copy] autorelease]; + OF_GETTER(password, YES) } - (OFDataArray*)initialMessage { return nil;