libpurple/protocols/msnp9/command.c

Sun, 11 Nov 2007 12:57:52 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Sun, 11 Nov 2007 12:57:52 +0000
changeset 21481
d52b697eaae7
child 23835
890bf3200498
permissions
-rw-r--r--

Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
old fools like me who prefer the stability of our MSNP9 code over the
features of MSNP14 can enable this using the --disable-msnp14 ./configure
option.

If we want to release from i.p.p and MSN stability is the only blocker, we
can trivially flick the default to use MSNP9 in configure.ac

21481
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
1 /**
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
2 * @file command.c MSN command functions
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
3 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
4 * purple
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
5 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
8 * source distribution.
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
9 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
13 * (at your option) any later version.
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
14 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
18 * GNU General Public License for more details.
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
19 *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
23 */
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
24 #include "msn.h"
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
25 #include "command.h"
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
26
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
27 static gboolean
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
28 is_num(char *str)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
29 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
30 char *c;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
31 for (c = str; *c; c++) {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
32 if (!(g_ascii_isdigit(*c)))
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
33 return FALSE;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
34 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
35
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
36 return TRUE;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
37 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
38
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
39 MsnCommand *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
40 msn_command_from_string(const char *string)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
41 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
42 MsnCommand *cmd;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
43 char *tmp;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
44 char *param_start;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
45
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
46 g_return_val_if_fail(string != NULL, NULL);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
47
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
48 tmp = g_strdup(string);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
49 param_start = strchr(tmp, ' ');
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
50
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
51 cmd = g_new0(MsnCommand, 1);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
52 cmd->command = tmp;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
53
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
54 if (param_start)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
55 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
56 *param_start++ = '\0';
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
57 cmd->params = g_strsplit(param_start, " ", 0);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
58 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
59
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
60 if (cmd->params != NULL)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
61 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
62 char *param;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
63 int c;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
64
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
65 for (c = 0; cmd->params[c]; c++);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
66 cmd->param_count = c;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
67
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
68 param = cmd->params[0];
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
69
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
70 cmd->trId = is_num(param) ? atoi(param) : 0;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
71 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
72 else
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
73 cmd->trId = 0;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
74
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
75 msn_command_ref(cmd);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
76
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
77 return cmd;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
78 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
79
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
80 void
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
81 msn_command_destroy(MsnCommand *cmd)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
82 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
83 g_return_if_fail(cmd != NULL);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
84
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
85 if (cmd->ref_count > 0)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
86 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
87 msn_command_unref(cmd);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
88 return;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
89 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
90
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
91 if (cmd->payload != NULL)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
92 g_free(cmd->payload);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
93
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
94 g_free(cmd->command);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
95 g_strfreev(cmd->params);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
96 g_free(cmd);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
97 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
98
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
99 MsnCommand *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
100 msn_command_ref(MsnCommand *cmd)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
101 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
102 g_return_val_if_fail(cmd != NULL, NULL);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
103
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
104 cmd->ref_count++;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
105 return cmd;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
106 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
107
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
108 MsnCommand *
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
109 msn_command_unref(MsnCommand *cmd)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
110 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
111 g_return_val_if_fail(cmd != NULL, NULL);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
112 g_return_val_if_fail(cmd->ref_count > 0, NULL);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
113
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
114 cmd->ref_count--;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
115
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
116 if (cmd->ref_count == 0)
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
117 {
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
118 msn_command_destroy(cmd);
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
119 return NULL;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
120 }
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
121
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
122 return cmd;
d52b697eaae7 Add MSNP9 back as an alternative alongside the existing MSN prpl. Cowardly
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
123 }

mercurial