#include "camel-log.h"
int camel_debug_level = 10;
-FILE *camel_log_file_descriptor = stderr;
+FILE *camel_log_file_descriptor = NULL;
void
camel_log(CamelLogLevel level, const gchar *format, ... )
{
va_list args;
+ if (camel_log_file_descriptor == NULL)
+ camel_log_file_descriptor = stderr;
+
if (level<=camel_debug_level)
{
va_start(args, format);
#include "gmime-content-field.h"
#include "gstring-util.h"
#include "camel-log.h"
+#include "gmime-utils.h"
typedef enum {
HEADER_UNKNOWN,
// GString *current;
CamelStream *stream = (CamelStream *)user_data;
if ( (recipient_type) && (recipient_type->str) )
- write_header_with_glist_to_stream (stream, recipient_type->str, recipients);
+ write_header_with_glist_to_stream (stream, recipient_type->str, recipients, ", ");
}
static void
if ( (mode & CAMEL_STREAM_FS_READ) && !(mode & CAMEL_STREAM_FS_WRITE) )
if (v == -1) return NULL;
- fd = open (name->str, flags);
+ fd = open (name->str, flags, 0600);
if (fd==-1) {
CAMEL_LOG (FULL_DEBUG, "CamelStreamFs::new_with_name can not obtain fd for file \"%s\"\n", name->str);
CAMEL_LOG (FULL_DEBUG, " Full error text is : %s\n", strerror(errno));