Mercurial > pidgin
changeset 23466:f1345f4338e3
I was getting annoyed with this extra printing, so now on MSN, it only
print a command's payload length when it's a command that is actually
supposed to contain a payload.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 07 Jun 2008 04:05:25 +0000 |
parents | 1d97298ccff5 |
children | b3890180aa2e |
files | libpurple/protocols/msn/command.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/command.c Sat Jun 07 03:56:23 2008 +0000 +++ b/libpurple/protocols/msn/command.c Sat Jun 07 04:05:25 2008 +0000 @@ -69,18 +69,22 @@ /* * set command Payload length */ -static void +static gboolean msn_set_payload_len(MsnCommand *cmd) { char *param; int len = 0; + gboolean has_payload = FALSE; if (msn_check_payload_cmd(cmd->command) && (cmd->param_count > 0)){ param = cmd->params[cmd->param_count - 1]; len = is_num(param) ? atoi(param) : 0; + has_payload = TRUE; } cmd->payload_len = len; + + return has_payload; } MsnCommand * @@ -120,8 +124,8 @@ /* khc: Huh! */ /*add payload Length checking*/ - msn_set_payload_len(cmd); - purple_debug_info("MSNP14","get payload len:%" G_GSIZE_FORMAT "\n", cmd->payload_len); + if (msn_set_payload_len(cmd)) + purple_debug_info("MSNP14","get payload len:%" G_GSIZE_FORMAT "\n", cmd->payload_len); msn_command_ref(cmd);