Mercurial > pidgin
diff libpurple/protocols/msn/cmdproc.c @ 30710:f7ee91763c6b
msn: Remove msn_cmdproc_send_quick in favor of msn_cmdproc_send_trans
With this changes whe have an unified and robust way to send commands.
We avoid duplicated code and it's easier to find problems since the code is only
in one place.
author | masca@cpw.pidgin.im |
---|---|
date | Wed, 10 Mar 2010 22:16:04 +0000 |
parents | 4d7dfeae29c6 |
children | 7b310568cd87 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/cmdproc.c Wed Mar 10 21:46:37 2010 +0000 +++ b/libpurple/protocols/msn/cmdproc.c Wed Mar 10 22:16:04 2010 +0000 @@ -155,48 +155,6 @@ } void -msn_cmdproc_send_quick(MsnCmdProc *cmdproc, const char *command, - const char *format, ...) -{ - MsnServConn *servconn; - char *data; - char *params = NULL; - va_list arg; - size_t len; - - g_return_if_fail(cmdproc != NULL); - g_return_if_fail(command != NULL); - - servconn = cmdproc->servconn; - - if (!servconn->connected) - return; - - if (format != NULL) - { - va_start(arg, format); - params = g_strdup_vprintf(format, arg); - va_end(arg); - } - - if (params != NULL) - data = g_strdup_printf("%s %s\r\n", command, params); - else - data = g_strdup_printf("%s\r\n", command); - - g_free(params); - - len = strlen(data); - - show_debug_cmd(cmdproc, FALSE, data); - - msn_servconn_write(servconn, data, len); - - g_free(data); -} - - -void msn_cmdproc_process_payload(MsnCmdProc *cmdproc, char *payload, int payload_len) {