* src/imap.c
fix truncation of too long commands
(closes Bug 167 IMAP hangs trying to get envelope
information in imap_get_uncached_messages)
+2003-05-28 [christoph] 0.9.0claws5
+
+ * src/imap.c
+ fix truncation of too long commands
+
+ (closes Bug 167 IMAP hangs trying to get envelope
+ information in imap_get_uncached_messages)
+
2003-05-27 [paul] 0.9.0claws4
* tools/Makefile.am
2003-05-27 [paul] 0.9.0claws4
* tools/Makefile.am
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
static void imap_gen_send(IMAPSession *session, const gchar *format, ...)
{
static void imap_gen_send(IMAPSession *session, const gchar *format, ...)
{
- gchar buf[IMAPBUFSIZE];
- gchar tmp[IMAPBUFSIZE];
+ gchar *buf;
+ gchar *tmp;
gchar *p;
va_list args;
va_start(args, format);
gchar *p;
va_list args;
va_start(args, format);
- g_vsnprintf(tmp, sizeof(tmp), format, args);
+ tmp = g_strdup_vprintf(format, args);
va_end(args);
session->cmd_count++;
va_end(args);
session->cmd_count++;
- g_snprintf(buf, sizeof(buf), "%d %s\r\n", session->cmd_count, tmp);
+ buf = g_strdup_printf("%d %s\r\n", session->cmd_count, tmp);
if (!strncasecmp(tmp, "LOGIN ", 6) && (p = strchr(tmp + 6, ' '))) {
*p = '\0';
log_print("IMAP4> %d %s ********\n", session->cmd_count, tmp);
if (!strncasecmp(tmp, "LOGIN ", 6) && (p = strchr(tmp + 6, ' '))) {
*p = '\0';
log_print("IMAP4> %d %s ********\n", session->cmd_count, tmp);
log_print("IMAP4> %d %s\n", session->cmd_count, tmp);
sock_write_all(SESSION(session)->sock, buf, strlen(buf));
log_print("IMAP4> %d %s\n", session->cmd_count, tmp);
sock_write_all(SESSION(session)->sock, buf, strlen(buf));
+ g_free(tmp);
+ g_free(buf);
}
static gint imap_gen_recv(IMAPSession *session, gchar **buf)
}
static gint imap_gen_recv(IMAPSession *session, gchar **buf)