annotate src/protocols/novell/nmrequest.c @ 10831:ea65b2abd8d2

[gaim-migrate @ 12499] Fix bug #1083465 - don't automatically add yourself to your buddy list with the gevolution plugin, this is probably what caused complaint #59 that Ubuntu interface designer had. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 16 Apr 2005 16:53:05 +0000
parents d77537e8bfe5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8675
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /*
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * nmrequest.c
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
8933
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
4 * Copyright (c) 2004 Novell, Inc. All Rights Reserved.
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
5 *
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
6 * This program is free software; you can redistribute it and/or modify
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
7 * it under the terms of the GNU General Public License as published by
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
8 * the Free Software Foundation; version 2 of the License.
8675
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 *
8933
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
10 * This program is distributed in the hope that it will be useful,
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
13 * GNU General Public License for more details.
8684
046dd8ef2920 [gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents: 8675
diff changeset
14 *
8933
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
15 * You should have received a copy of the GNU General Public License
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
16 * along with this program; if not, write to the Free Software
6663ad2386d9 [gaim-migrate @ 9703]
Luke Schierer <lschiere@pidgin.im>
parents: 8684
diff changeset
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
8675
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 *
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 */
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 #include "nmrequest.h"
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22
9360
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
23 static int count = 0;
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
24
8675
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 struct _NMRequest
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 int trans_id;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 char *cmd;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 int gmt;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 gpointer data;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 gpointer user_define;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 nm_response_cb callback;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 int ref_count;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 NMERR_T ret_code;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 };
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36
9360
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
37 NMRequest *nm_create_request(const char *cmd, int trans_id, int gmt, nm_response_cb cb,
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
38 gpointer resp_data, gpointer user_define)
8675
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 NMRequest *req;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 if (cmd == NULL)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43 return NULL;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 req = g_new0(NMRequest, 1);
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46 req->cmd = g_strdup(cmd);
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 req->trans_id = trans_id;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48 req->gmt = gmt;
9360
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
49 req->callback = cb;
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
50 req->data = resp_data;
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
51 req->user_define = user_define;
8675
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 req->ref_count = 1;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53
9360
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
54 gaim_debug_info("novell", "Creating NMRequest instance, total=%d\n", ++count);
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
55
8675
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 return req;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 void
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 nm_release_request(NMRequest * req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 if (req && (--req->ref_count == 0)) {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 if (req->cmd)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64 g_free(req->cmd);
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 g_free(req);
9360
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
66
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
67 gaim_debug_info("novell",
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
68 "Releasing NMRequest instance, total=%d\n", --count);
8675
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 }
9360
d77537e8bfe5 [gaim-migrate @ 10168]
Luke Schierer <lschiere@pidgin.im>
parents: 8933
diff changeset
70
8675
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73 void
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 nm_request_add_ref(NMRequest * req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 if (req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 req->ref_count++;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 void
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 nm_request_set_callback(NMRequest * req, nm_response_cb callback)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83 if (req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 req->callback = callback;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 void
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 nm_request_set_data(NMRequest * req, gpointer data)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 if (req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91 req->data = data;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
94 void
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 nm_request_set_user_define(NMRequest * req, gpointer user_define)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
96 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97 if (req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98 req->user_define = user_define;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
99 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
100
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
101 int
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
102 nm_request_get_trans_id(NMRequest * req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
103 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104 if (req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 return req->trans_id;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
106 else
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 return -1;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
110 const char *
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 nm_request_get_cmd(NMRequest * req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
112 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113 if (req == NULL)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114 return NULL;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116 return req->cmd;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 gpointer
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
120 nm_request_get_data(NMRequest * req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
121 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122 if (req == NULL)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123 return NULL;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
124
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 return req->data;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
127
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
128 gpointer
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129 nm_request_get_user_define(NMRequest * req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
130 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131 if (req == NULL)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132 return NULL;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134 return req->user_define;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
137 nm_response_cb
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
138 nm_request_get_callback(NMRequest * req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
139 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140 if (req == NULL)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
141 return NULL;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
142
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
143 return req->callback;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
144 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
145
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
146
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
147 void
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
148 nm_request_set_ret_code(NMRequest * req, NMERR_T rc)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
149 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
150 if (req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
151 req->ret_code = rc;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
152 }
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
153
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
154 NMERR_T
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
155 nm_request_get_ret_code(NMRequest * req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
156 {
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
157 if (req)
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
158 return req->ret_code;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
159 else
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
160 return (NMERR_T) - 1;
9ee2542d1104 [gaim-migrate @ 9428]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
161 }