]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/baconfig.h
Update doc
[bacula/bacula] / bacula / src / baconfig.h
index 90a2248fbbb3a68e1e950d264fced1146b316a9a..35698e8c1d10f389ab7f6e5e2e038fa3499324d3 100644 (file)
@@ -260,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
@@ -365,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)
@@ -380,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 */
@@ -400,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