38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
{
[sock release];
[parser release];
[elementBuilder release];
[super dealloc];
}
- (void)setUsername: (OFString*)username_
{
OFString *old = username;
char *node;
Stringprep_rc rc;
if ((rc = stringprep_profile([username_ cString], &node, "Nodeprep", 0))
!= STRINGPREP_OK) {
of_log(@"Nodeprep failed: %s", stringprep_strerror(rc));
assert(0);
}
@try {
username = [[OFString alloc] initWithCString: node];
} @finally {
free(node);
}
[old release];
}
- (void)_startStream
{
[sock writeFormat: @"<?xml version='1.0'?>\n"
@"<stream:stream to='%@' xmlns='" NS_CLIENT @"' "
@"xmlns:stream='" NS_STREAM @"' "
@"version='1.0'>", server];
|