Mercurial > pidgin.yaz
diff libpurple/protocols/msn/transaction.c @ 31149:54c8aeecab4c
We need a way to send commands without transaction ID
author | masca@cpw.pidgin.im |
---|---|
date | Thu, 11 Mar 2010 17:59:53 +0000 |
parents | 6a23d7f84143 |
children | c316749944c1 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/transaction.c Wed Mar 10 22:16:04 2010 +0000 +++ b/libpurple/protocols/msn/transaction.c Thu Mar 11 17:59:53 2010 +0000 @@ -37,6 +37,7 @@ trans->cmdproc = cmdproc; trans->command = g_strdup(command); + trans->send_trId = TRUE; if (format != NULL) { @@ -96,8 +97,10 @@ if (trans->params != NULL) str = g_strdup_printf("%s %u %s\r\n", trans->command, trans->trId, trans->params); + else if (trans->send_trId) + str = g_strdup_printf("%s %u\r\n", trans->command, trans->trId); else - str = g_strdup_printf("%s %u\r\n", trans->command, trans->trId); + str = g_strdup_printf("%s\r\n", trans->command); return str; } @@ -175,6 +178,14 @@ } void +msn_transaction_set_send_trId(MsnTransaction *trans, gboolean send) +{ + g_return_if_fail(trans != NULL); + + trans->send_trId = send; +} + +void msn_transaction_add_cb(MsnTransaction *trans, char *answer, MsnTransCb cb) {