Mercurial > pidgin
comparison src/protocols/novell/nmevent.c @ 8684:046dd8ef2920
[gaim-migrate @ 9437]
Excess whitespace bad, especially *that* much.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 17 Apr 2004 18:29:20 +0000 |
parents | 9ee2542d1104 |
children | a2affcdf8e01 |
comparison
equal
deleted
inserted
replaced
8683:76935eb1bd40 | 8684:046dd8ef2920 |
---|---|
7 * USED, PRACTICED, PERFORMED, COPIED, DISTRIBUTED, REVISED, MODIFIED, | 7 * USED, PRACTICED, PERFORMED, COPIED, DISTRIBUTED, REVISED, MODIFIED, |
8 * TRANSLATED, ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, | 8 * TRANSLATED, ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, |
9 * RECAST, TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, | 9 * RECAST, TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, |
10 * INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT | 10 * INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT |
11 * THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY. | 11 * THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY. |
12 * | 12 * |
13 * AS BETWEEN [GAIM] AND NOVELL, NOVELL GRANTS [GAIM] THE RIGHT TO REPUBLISH | 13 * AS BETWEEN [GAIM] AND NOVELL, NOVELL GRANTS [GAIM] THE RIGHT TO REPUBLISH |
14 * THIS WORK UNDER THE GPL (GNU GENERAL PUBLIC LICENSE) WITH ALL RIGHTS AND | 14 * THIS WORK UNDER THE GPL (GNU GENERAL PUBLIC LICENSE) WITH ALL RIGHTS AND |
15 * LICENSES THEREUNDER. IF YOU HAVE RECEIVED THIS WORK DIRECTLY OR INDIRECTLY | 15 * LICENSES THEREUNDER. IF YOU HAVE RECEIVED THIS WORK DIRECTLY OR INDIRECTLY |
16 * FROM [GAIM] AS PART OF SUCH A REPUBLICATION, YOU HAVE ALL RIGHTS AND LICENSES | 16 * FROM [GAIM] AS PART OF SUCH A REPUBLICATION, YOU HAVE ALL RIGHTS AND LICENSES |
17 * GRANTED BY [GAIM] UNDER THE GPL. IN CONNECTION WITH SUCH A REPUBLICATION, IF | 17 * GRANTED BY [GAIM] UNDER THE GPL. IN CONNECTION WITH SUCH A REPUBLICATION, IF |
130 event = user_data; | 130 event = user_data; |
131 | 131 |
132 if (ret_val == NM_OK) { | 132 if (ret_val == NM_OK) { |
133 if (event && user_record) { | 133 if (event && user_record) { |
134 | 134 |
135 /* Add the user record to the event structure | 135 /* Add the user record to the event structure |
136 * and make the callback. | 136 * and make the callback. |
137 */ | 137 */ |
138 nm_event_set_user_record(event, user_record); | 138 nm_event_set_user_record(event, user_record); |
139 if ((cb = nm_user_get_event_callback(user))) { | 139 if ((cb = nm_user_get_event_callback(user))) { |
140 cb(user, event); | 140 cb(user, event); |
173 if (conference) { | 173 if (conference) { |
174 | 174 |
175 /* Add source of event as recip of the conference */ | 175 /* Add source of event as recip of the conference */ |
176 nm_conference_add_participant(conference, user_record); | 176 nm_conference_add_participant(conference, user_record); |
177 | 177 |
178 /* Add the user record to the event structure | 178 /* Add the user record to the event structure |
179 * and make the callback. | 179 * and make the callback. |
180 */ | 180 */ |
181 nm_event_set_user_record(event, user_record); | 181 nm_event_set_user_record(event, user_record); |
182 if ((cb = nm_user_get_event_callback(user))) { | 182 if ((cb = nm_user_get_event_callback(user))) { |
183 cb(user, event); | 183 cb(user, event); |
467 | 467 |
468 return rc; | 468 return rc; |
469 } | 469 } |
470 | 470 |
471 /* Read the conference left event, set up the event object, and | 471 /* Read the conference left event, set up the event object, and |
472 * remove the conference from the list if there are no more | 472 * remove the conference from the list if there are no more |
473 * participants | 473 * participants |
474 */ | 474 */ |
475 static NMERR_T | 475 static NMERR_T |
476 handle_conference_left(NMUser * user, NMEvent * event) | 476 handle_conference_left(NMUser * user, NMEvent * event) |
477 { | 477 { |
498 if (rc == NM_OK) { | 498 if (rc == NM_OK) { |
499 conference = nm_conference_list_find(user, guid); | 499 conference = nm_conference_list_find(user, guid); |
500 if (conference) { | 500 if (conference) { |
501 nm_event_set_conference(event, conference); | 501 nm_event_set_conference(event, conference); |
502 nm_conference_set_flags(conference, flags); | 502 nm_conference_set_flags(conference, flags); |
503 | 503 |
504 nm_conference_remove_participant(conference, nm_event_get_source(event)); | 504 nm_conference_remove_participant(conference, nm_event_get_source(event)); |
505 if (nm_conference_get_participant_count(conference) == 0) { | 505 if (nm_conference_get_participant_count(conference) == 0) { |
506 nm_conference_list_remove(user, conference); | 506 nm_conference_list_remove(user, conference); |
507 } | 507 } |
508 | 508 |
509 } else { | 509 } else { |
510 rc = NMERR_CONFERENCE_NOT_FOUND; | 510 rc = NMERR_CONFERENCE_NOT_FOUND; |
511 } | 511 } |
512 } | 512 } |
513 | 513 |
583 | 583 |
584 if (rc == NM_OK) { | 584 if (rc == NM_OK) { |
585 conference = nm_conference_list_find(user, guid); | 585 conference = nm_conference_list_find(user, guid); |
586 if (conference) { | 586 if (conference) { |
587 nm_conference_set_flags(conference, flags); | 587 nm_conference_set_flags(conference, flags); |
588 | 588 |
589 nm_event_set_conference(event, conference); | 589 nm_event_set_conference(event, conference); |
590 | 590 |
591 /* Add the new user to the participants list */ | 591 /* Add the new user to the participants list */ |
592 user_record = nm_find_user_record(user, nm_event_get_source(event)); | 592 user_record = nm_find_user_record(user, nm_event_get_source(event)); |
593 if (user_record) { | 593 if (user_record) { |
594 nm_conference_add_participant(conference, user_record); | 594 nm_conference_add_participant(conference, user_record); |
595 } else { | 595 } else { |
596 | 596 |
597 /* Need to go to the server to get details for the user */ | 597 /* Need to go to the server to get details for the user */ |
598 rc = nm_send_get_details(user, nm_event_get_source(event), | 598 rc = nm_send_get_details(user, nm_event_get_source(event), |
599 _got_user_for_conference, event); | 599 _got_user_for_conference, event); |
600 if (rc == NM_OK) | 600 if (rc == NM_OK) |
601 rc = -1; /* Not done processing the event yet! */ | 601 rc = -1; /* Not done processing the event yet! */ |
602 } | 602 } |
603 | 603 |
604 } else { | 604 } else { |
605 rc = NMERR_CONFERENCE_NOT_FOUND; | 605 rc = NMERR_CONFERENCE_NOT_FOUND; |
606 } | 606 } |
607 } | 607 } |
608 | 608 |