ObjXMPP  Check-in [d6b5e4a4e1]

Overview
Comment:Handle nil as argument to XMPPStanza's setters
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d6b5e4a4e1287972566e33ac88638322df248ec6358e112277a0f6a3614c7ad3
User & Date: florob@babelmonkeys.de on 2011-03-24 17:57:07
Other Links: manifest | tags
Context
2011-03-24
17:57
Make use of the XMPPStanza convenience functions check-in: 014e7a9d68 user: florob@babelmonkeys.de tags: trunk
17:57
Handle nil as argument to XMPPStanza's setters check-in: d6b5e4a4e1 user: florob@babelmonkeys.de tags: trunk
2011-03-21
23:37
Properly handle roster items which are in multiple groups. check-in: b9354d7713 user: js tags: trunk
Changes

Modified src/XMPPStanza.m from [e5a3313b65] to [1ae4e0c618].

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: (XMPPJID*)from_
{
	XMPPJID *old = from;
	from = [from_ copy];
	[old release];

	[self removeAttributeForName: @"from"];


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

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

	[self removeAttributeForName: @"to"];


	[self addAttributeWithName: @"to"
		       stringValue: to_.fullJID];
}

- (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







>
>
|
|









>
>
|
|









>
>
|
|









>
>
|
|


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
201
202
203
204
205
206
207
208
- (void)setFrom: (XMPPJID*)from_
{
	XMPPJID *old = from;
	from = [from_ copy];
	[old release];

	[self removeAttributeForName: @"from"];

	if (from_ != nil)
		[self addAttributeWithName: @"from"
			       stringValue: from_.fullJID];
}

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

	[self removeAttributeForName: @"to"];

	if (to_ != nil)
		[self addAttributeWithName: @"to"
			       stringValue: to_.fullJID];
}

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

	[self removeAttributeForName: @"type"];

	if (type_ != nil)
		[self addAttributeWithName: @"type"
			       stringValue: type];
}

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

	[self removeAttributeForName: @"id"];

	if (ID_ != nil)
		[self addAttributeWithName: @"id"
			       stringValue: ID];
}
@end