Overview
Comment: | Generate unique IDs and free all instance variables on dealloc. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
913f68c8af5800aaaadae0840be6e8ed |
User & Date: | js on 2011-03-21 18:27:01 |
Other Links: | manifest | tags |
Context
2011-03-21
| ||
19:51 | Request and handle roster. check-in: b74a310cc3 user: js tags: trunk | |
18:27 | Generate unique IDs and free all instance variables on dealloc. check-in: 913f68c8af user: js tags: trunk | |
18:01 | Fix possible access to uninitialized values. check-in: 6d4ff18032 user: js tags: trunk | |
Changes
Modified src/XMPPConnection.h from [2b28aa53b0] to [48873be5e7].
︙ | |||
49 50 51 52 53 54 55 | 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 94 95 96 97 | - - + - - - - - - - - - + + + - + - - - - + + + + + + + + | */ @interface XMPPConnection: OFObject <OFXMLParserDelegate, OFXMLElementBuilderDelegate> { OFTCPSocket *sock; OFXMLParser *parser; OFXMLElementBuilder *elementBuilder; |
Modified src/XMPPConnection.m from [d8ac129794] to [0ae0e9e2bc].
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - - - - + + + + | #define NS_STARTTLS @"urn:ietf:params:xml:ns:xmpp-tls" #define NS_SESSION @"urn:ietf:params:xml:ns:xmpp-session" #define NS_STREAM @"http://etherx.jabber.org/streams" @interface XMPPConnection () - (void)XMPP_startStream; - (void)XMPP_sendAuth: (OFString*)name; |
︙ | |||
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | + + + + + + + + | } - (void)dealloc { [sock release]; [parser release]; [elementBuilder release]; [username release]; [password release]; [server release]; [resource release]; [JID release]; [delegate release]; [authModule release]; [bindID release]; [sessionID release]; [super dealloc]; } - (void)setUsername: (OFString*)username_ { OFString *old = username; |
︙ | |||
227 228 229 230 231 232 233 234 235 236 237 238 239 240 | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | + + + + + | } - (void)sendStanza: (OFXMLElement*)elem { of_log(@"Out: %@", elem); [sock writeString: [elem stringValue]]; } - (OFString*)generateStanzaID { return [OFString stringWithFormat: @"objxmpp_%u", lastID++]; } - (void)parser: (OFXMLParser*)p didStartElement: (OFString*)name withPrefix: (OFString*)prefix namespace: (OFString*)ns attributes: (OFArray*)attrs { |
︙ | |||
358 359 360 361 362 363 364 | 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - - - - - - - - - - + - - + + | assert(0); } assert(0); } |
︙ | |||
479 480 481 482 483 484 485 | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | + + + + - - - - - + + + + + + + + + + + + + + - - + + - + + + + - + + + + | [[authModule clientFirstMessage] stringByBase64Encoding]]]; [self sendStanza: authTag]; } - (void)XMPP_sendResourceBind { XMPPIQ *iq; OFXMLElement *bind; bindID = [[self generateStanzaID] retain]; |