comparison libpurple/protocols/msn/transaction.c @ 31154:c316749944c1

I don't really like this name.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 13 Mar 2010 08:18:25 +0000
parents 54c8aeecab4c
children a99b6dcdb60d
comparison
equal deleted inserted replaced
31153:59cf1be8eaa7 31154:c316749944c1
35 35
36 trans = g_new0(MsnTransaction, 1); 36 trans = g_new0(MsnTransaction, 1);
37 37
38 trans->cmdproc = cmdproc; 38 trans->cmdproc = cmdproc;
39 trans->command = g_strdup(command); 39 trans->command = g_strdup(command);
40 trans->send_trId = TRUE; 40 trans->saveable = TRUE;
41 41
42 if (format != NULL) 42 if (format != NULL)
43 { 43 {
44 va_start(arg, format); 44 va_start(arg, format);
45 trans->params = g_strdup_vprintf(format, arg); 45 trans->params = g_strdup_vprintf(format, arg);
95 95
96 g_return_val_if_fail(trans != NULL, FALSE); 96 g_return_val_if_fail(trans != NULL, FALSE);
97 97
98 if (trans->params != NULL) 98 if (trans->params != NULL)
99 str = g_strdup_printf("%s %u %s\r\n", trans->command, trans->trId, trans->params); 99 str = g_strdup_printf("%s %u %s\r\n", trans->command, trans->trId, trans->params);
100 else if (trans->send_trId) 100 else if (trans->saveable)
101 str = g_strdup_printf("%s %u\r\n", trans->command, trans->trId); 101 str = g_strdup_printf("%s %u\r\n", trans->command, trans->trId);
102 else 102 else
103 str = g_strdup_printf("%s\r\n", trans->command); 103 str = g_strdup_printf("%s\r\n", trans->command);
104 104
105 return str; 105 return str;
176 g_return_if_fail(trans != NULL); 176 g_return_if_fail(trans != NULL);
177 trans->data_free = fn; 177 trans->data_free = fn;
178 } 178 }
179 179
180 void 180 void
181 msn_transaction_set_send_trId(MsnTransaction *trans, gboolean send) 181 msn_transaction_set_saveable(MsnTransaction *trans, gboolean saveable)
182 { 182 {
183 g_return_if_fail(trans != NULL); 183 g_return_if_fail(trans != NULL);
184 184
185 trans->send_trId = send; 185 trans->saveable = saveable;
186 } 186 }
187 187
188 void 188 void
189 msn_transaction_add_cb(MsnTransaction *trans, char *answer, 189 msn_transaction_add_cb(MsnTransaction *trans, char *answer,
190 MsnTransCb cb) 190 MsnTransCb cb)