Differences From Artifact [620a05ff31]:
- File src/XMPPConnection.m — part of check-in [c322888ad7] at 2011-02-13 01:07:36 on branch trunk — Add support for requesting a certain resource (user: florob@babelmonkeys.de, size: 6497) [annotate] [blame] [check-ins using]
To Artifact [2e30d4f8cc]:
- File
src/XMPPConnection.m
— part of check-in
[ea9006fa33]
at
2011-02-15 02:52:16
on branch trunk
— Perform SASLPrep on the username and Resourceprep on the resource
The username is not necessarily a nodepart, therefore SASLPrep is more
appropriate than Nodeprep which we had before. (user: florob@babelmonkeys.de, size: 6892) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
48 49 50 51 52 53 54 | - (void)setUsername: (OFString*)username_ { OFString *old = username; char *node; Stringprep_rc rc; | | | > > > > > > > > > > > > > > > > > > > > > | 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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - (void)setUsername: (OFString*)username_ { OFString *old = username; char *node; Stringprep_rc rc; if ((rc = stringprep_profile([username_ cString], &node, "SASLprep", 0)) != STRINGPREP_OK) { of_log(@"SASLprep failed: %s", stringprep_strerror(rc)); assert(0); } @try { username = [[OFString alloc] initWithCString: node]; } @finally { free(node); } [old release]; } - (void)setResource: (OFString*)resource_ { OFString *old = resource; char *res; Stringprep_rc rc; if ((rc = stringprep_profile([resource_ cString], &res, "Resourceprep", 0)) != STRINGPREP_OK) { of_log(@"Resourceprep failed: %s", stringprep_strerror(rc)); assert(0); } @try { resource = [[OFString alloc] initWithCString: res]; } @finally { free(res); } [old release]; } - (void)setServer: (OFString*)server_ { OFString *old = server; |
︙ | ︙ |