| 1 /* |
1 /* |
| 2 * nmconference.c |
2 * nmconference.c |
| 3 * |
3 * |
| 4 * Copyright © 2004 Unpublished Work of Novell, Inc. All Rights Reserved. |
4 * Copyright (c) 2004 Novell, Inc. All Rights Reserved. |
| 5 * |
5 * |
| 6 * THIS WORK IS AN UNPUBLISHED WORK OF NOVELL, INC. NO PART OF THIS WORK MAY BE |
6 * This program is free software; you can redistribute it and/or modify |
| 7 * USED, PRACTICED, PERFORMED, COPIED, DISTRIBUTED, REVISED, MODIFIED, |
7 * it under the terms of the GNU General Public License as published by |
| 8 * TRANSLATED, ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, |
8 * the Free Software Foundation; version 2 of the License. |
| 9 * RECAST, TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, |
9 * |
| 10 * INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT |
10 * This program is distributed in the hope that it will be useful, |
| 11 * THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY. |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 * AS BETWEEN [GAIM] AND NOVELL, NOVELL GRANTS [GAIM] THE RIGHT TO REPUBLISH |
13 * GNU General Public License for more details. |
| 14 * THIS WORK UNDER THE GPL (GNU GENERAL PUBLIC LICENSE) WITH ALL RIGHTS AND |
14 * |
| 15 * LICENSES THEREUNDER. IF YOU HAVE RECEIVED THIS WORK DIRECTLY OR INDIRECTLY |
15 * You should have received a copy of the GNU General Public License |
| 16 * FROM [GAIM] AS PART OF SUCH A REPUBLICATION, YOU HAVE ALL RIGHTS AND LICENSES |
16 * along with this program; if not, write to the Free Software |
| 17 * GRANTED BY [GAIM] UNDER THE GPL. IN CONNECTION WITH SUCH A REPUBLICATION, IF |
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 * ANYTHING IN THIS NOTICE CONFLICTS WITH THE TERMS OF THE GPL, SUCH TERMS |
|
| 19 * PREVAIL. |
|
| 20 * |
18 * |
| 21 */ |
19 */ |
| 22 |
20 |
| 23 #include <string.h> |
21 #include <string.h> |
| 24 #include "nmconference.h" |
22 #include "nmconference.h" |
| 61 conf->guid = g_strdup(BLANK_GUID); |
59 conf->guid = g_strdup(BLANK_GUID); |
| 62 } |
60 } |
| 63 conf->ref_count = 1; |
61 conf->ref_count = 1; |
| 64 |
62 |
| 65 gaim_debug(GAIM_DEBUG_INFO, "novell", |
63 gaim_debug(GAIM_DEBUG_INFO, "novell", |
| 66 "Creating a conference 0x%x, total=%d\n", |
64 "Creating a conference %p, total=%d\n", |
| 67 (guint32) conf, conf_count++); |
65 conf, conf_count++); |
| 68 |
66 |
| 69 return conf; |
67 return conf; |
| 70 } |
68 } |
| 71 |
69 |
| 72 void |
70 void |
| 73 nm_release_conference(NMConference * conference) |
71 nm_release_conference(NMConference * conference) |
| 74 { |
72 { |
| 75 GSList *node; |
73 GSList *node; |
| 76 |
74 |
| 77 gaim_debug(GAIM_DEBUG_INFO, "novell", |
75 gaim_debug(GAIM_DEBUG_INFO, "novell", |
| 78 "In release conference 0x%x, refs=%d\n", |
76 "In release conference %p, refs=%d\n", |
| 79 (guint32) conference, conference->ref_count); |
77 conference, conference->ref_count); |
| 80 if (conference != NULL && (--conference->ref_count == 0)) { |
78 if (conference != NULL && (--conference->ref_count == 0)) { |
| 81 |
79 |
| 82 gaim_debug(GAIM_DEBUG_INFO, "novell", |
80 gaim_debug(GAIM_DEBUG_INFO, "novell", |
| 83 "Releasing conference 0x%x, total=%d\n", |
81 "Releasing conference %p, total=%d\n", |
| 84 (guint32) conference, --conf_count); |
82 conference, --conf_count); |
| 85 |
83 |
| 86 if (conference->guid) |
84 if (conference->guid) |
| 87 g_free(conference->guid); |
85 g_free(conference->guid); |
| 88 |
86 |
| 89 if (conference->participants) { |
87 if (conference->participants) { |