ObjXMPP  Check-in [51f917ae30]

Overview
Comment:Remove old attributes before adding new ones.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 51f917ae308d0157af6c163bfaaa47d0baf42c4a10344ca181fc801c634122d4
User & Date: js on 2011-02-19 15:08:57
Other Links: manifest | tags
Context
2011-02-19
16:23
Make use of -[elementsForName:]. check-in: fbe5acc621 user: js tags: trunk
15:08
Remove old attributes before adding new ones. check-in: 51f917ae30 user: js tags: trunk
2011-02-18
00:56
Perform IDNA's ToASCII operation on the server's domain name check-in: 0d872572ac user: florob@babelmonkeys.de tags: trunk
Changes

Modified src/XMPPStanza.m from [9c7b4d99c2] to [328a61beaa].

156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200

- (void)setFrom: (OFString*)from_
{
	OFString* old = from;
	from = [from_ copy];
	[old release];

	/* FIXME: Remove old attribute! */
	[self addAttributeWithName: @"from"
		       stringValue: from_];
}

- (void)setTo: (OFString*)to_
{
	OFString* old = to;
	to = [to_ copy];
	[old release];

	/* FIXME: Remove old attribute! */
	[self addAttributeWithName: @"to"
		       stringValue: to];
}

- (void)setType: (OFString*)type_
{
	OFString* old = type;
	type = [type_ copy];
	[old release];

	/* FIXME: Remove old attribute! */
	[self addAttributeWithName: @"type"
		       stringValue: type];
}

- (void)setID: (OFString*)ID_
{
	OFString* old = ID;
	ID = [ID_ copy];
	[old release];

	/* FIXME: Remove old attribute! */
	[self addAttributeWithName: @"id"
		       stringValue: ID];
}
@end







|










|










|










|




156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200

- (void)setFrom: (OFString*)from_
{
	OFString* old = from;
	from = [from_ copy];
	[old release];

	[self removeAttributeForName: @"from"];
	[self addAttributeWithName: @"from"
		       stringValue: from_];
}

- (void)setTo: (OFString*)to_
{
	OFString* old = to;
	to = [to_ copy];
	[old release];

	[self removeAttributeForName: @"to"];
	[self addAttributeWithName: @"to"
		       stringValue: to];
}

- (void)setType: (OFString*)type_
{
	OFString* old = type;
	type = [type_ copy];
	[old release];

	[self removeAttributeForName: @"type"];
	[self addAttributeWithName: @"type"
		       stringValue: type];
}

- (void)setID: (OFString*)ID_
{
	OFString* old = ID;
	ID = [ID_ copy];
	[old release];

	[self removeAttributeForName: @"id"];
	[self addAttributeWithName: @"id"
		       stringValue: ID];
}
@end