*
* Copyright (C) 2003 Hugo Villeneuve <hugo@hugovil.com>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * This file is released under the GPLv2
*/
/* Define filename_M */
}
if (wmnotify_infos.debug) {
- printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
- printf("IMAP4 Server Response (size %d bytes):\n", len);
printf("%s", rx_buffer);
- printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
}
/*
{
int len;
int i;
+ char debug_buffer[sizeof(tx_buffer)];
+ int debug_len;
/* Adding Transaction Label. */
tlabel++;
len += sprintf(tx_buffer + len, "%d", tlabel);
tlabel_len = len;
+ debug_len = 0;
+ debug_len += sprintf(debug_buffer + debug_len, "%s", tx_buffer);
+
/* Adding command and it's arguments. */
- for (i = 0; i < argc; i++)
+ for (i = 0; i < argc; i++) {
len += sprintf(tx_buffer + len, " %s", argv[i]);
+ if (STREQ(argv[0], IMAP4_CMD_LOGIN) && (i == 2)) {
+ debug_len += sprintf(debug_buffer + debug_len,
+ " XXXXXXXX");
+ }
+ else {
+ debug_len += sprintf(debug_buffer + debug_len,
+ " %s", argv[i]);
+ }
+ }
+
if (wmnotify_infos.debug) {
- tx_buffer[len] = '\0';
- printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
- printf("IMAP4 Client Command (size %d bytes):\n%s\n", len,
- tx_buffer);
- printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
+ debug_buffer[debug_len] = '\0';
+ printf("%s\n", debug_buffer);
}
/* Adding termination characters. */