X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fbaconfig.h;h=35698e8c1d10f389ab7f6e5e2e038fa3499324d3;hb=7f3b2717d08ce3a7618c0cf0dc5bf6a5f8ddbe76;hp=123f0128efc49300669d5fa3db2bec3d00f4cfb5;hpb=ed473a58f34389e2a91aeebc94e2b5e49f6d0fab;p=bacula%2Fbacula diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h index 123f0128ef..35698e8c1d 100644 --- a/bacula/src/baconfig.h +++ b/bacula/src/baconfig.h @@ -5,7 +5,7 @@ * Version $Id$ */ /* - Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker + Copyright (C) 2000-2004 Kern Sibbald and John Walker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -95,10 +95,9 @@ #endif /* - * Maximum number of bytes that you can push into a - * socket. + * Default network buffer size */ -#define MAX_NETWORK_BUFFER_SIZE (32 * 1024) +#define DEFAULT_NETWORK_BUFFER_SIZE (32 * 1024) /* * Stream definitions. Once defined these must NEVER @@ -261,6 +260,9 @@ extern void _v(char *file, int line, pthread_mutex_t *m); strerror(errstat)); \ } while(0) +#define LockRes() b_LockRes(__FILE__, __LINE__) +#define UnlockRes() b_UnlockRes(__FILE__, __LINE__) + /* * The digit following Dmsg and Emsg indicates the number of substitutions in @@ -366,6 +368,15 @@ extern void _v(char *file, int line, pthread_mutex_t *m); #define Jmsg5(jcr, typ, lvl, msg, a1, a2, a3, a4, a5) j_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3, a4, a5) #define Jmsg6(jcr, typ, lvl, msg, a1, a2, a3, a4, a5, a6) j_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3, a4, a5, a6) +/* Queued Job Error Messages that are delivered according to the message resource */ +#define Qmsg0(jcr, typ, lvl, msg) q_msg(__FILE__, __LINE__, jcr, typ, lvl, msg) +#define Qmsg1(jcr, typ, lvl, msg, a1) q_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1) +#define Qmsg2(jcr, typ, lvl, msg, a1, a2) q_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2) +#define Qmsg3(jcr, typ, lvl, msg, a1, a2, a3) q_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3) +#define Qmsg4(jcr, typ, lvl, msg, a1, a2, a3, a4) q_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3, a4) +#define Qmsg5(jcr, typ, lvl, msg, a1, a2, a3, a4, a5) q_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3, a4, a5) +#define Qmsg6(jcr, typ, lvl, msg, a1, a2, a3, a4, a5, a6) q_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3, a4, a5, a6) + /* Memory Messages that are edited into a Pool Memory buffer */ #define Mmsg0(buf, msg) m_msg(__FILE__, __LINE__, buf, msg) @@ -381,15 +392,16 @@ extern void _v(char *file, int line, pthread_mutex_t *m); #define Mmsg15(buf,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) m_msg(__FILE__,__LINE__,buf,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) /* Edit message into Pool Memory buffer -- no __FILE__ and __LINE__ */ -int Mmsg(POOLMEM **msgbuf, char *fmt,...); +int Mmsg(POOLMEM **msgbuf, const char *fmt,...); struct JCR; -void d_msg(char *file, int line, int level, char *fmt,...); -void p_msg(char *file, int line, int level, char *fmt,...); -void e_msg(char *file, int line, int type, int level, char *fmt,...); -void j_msg(char *file, int line, JCR *jcr, int type, int level, char *fmt,...); -int m_msg(char *file, int line, POOLMEM **msgbuf, char *fmt,...); +void d_msg(const char *file, int line, int level, const char *fmt,...); +void p_msg(const char *file, int line, int level, const char *fmt,...); +void e_msg(const char *file, int line, int type, int level, const char *fmt,...); +void j_msg(const char *file, int line, JCR *jcr, int type, int level, const char *fmt,...); +void q_msg(const char *file, int line, JCR *jcr, int type, int level, const char *fmt,...); +int m_msg(const char *file, int line, POOLMEM **msgbuf, const char *fmt,...); /* Use our strdup with smartalloc */ @@ -401,9 +413,9 @@ int m_msg(char *file, int line, POOLMEM **msgbuf, char *fmt,...); #define fgets(x,y,z) bfgets((x), (y), (z)) #ifdef DEBUG -#define bstrdup(str) strcpy((char *) b_malloc(__FILE__,__LINE__,strlen((str))+1),(str)) +#define bstrdup(str) strcpy((char *)b_malloc(__FILE__,__LINE__,strlen((str))+1),(str)) #else -#define bstrdup(str) strcpy((char *) bmalloc(strlen((str))+1),(str)) +#define bstrdup(str) strcpy((char *)bmalloc(strlen((str))+1),(str)) #endif #ifdef DEBUG @@ -434,7 +446,7 @@ extern int thr_setconcurrency(int); #ifdef HAVE_DARWIN_OS /* Apparently someone forgot to wrap getdomainname as a C function */ -extern "C" int getdomainname(char *name, size_t len); +extern "C" int getdomainname(char *name, int len); /* Darwin lib fnmatch() doesn't work, so use our own */ #undef HAVE_FNMATCH