mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Introduce a fetchDebug global. Change the DEBUG macro so it only runs the
debugging code if fetchDebug is set. PR: bin/32615 MFC after: 1 week
This commit is contained in:
parent
d1f21093cd
commit
7eb2f34d73
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87560
@ -59,7 +59,7 @@ int _fetch_add_entry(struct url_ent **, int *, int *,
|
||||
#define _url_seterr(n) _fetch_seterr(_url_errlist, n)
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define DEBUG(x) do x; while (0)
|
||||
#define DEBUG(x) do { if (fetchDebug) { x; } } while (0)
|
||||
#else
|
||||
#define DEBUG(x) do { } while (0)
|
||||
#endif
|
||||
|
@ -45,6 +45,7 @@ int fetchLastErrCode;
|
||||
char fetchLastErrString[MAXERRSTRING];
|
||||
int fetchTimeout;
|
||||
int fetchRestartCalls = 1;
|
||||
int fetchDebug;
|
||||
|
||||
|
||||
/*** Local data **************************************************************/
|
||||
|
@ -136,4 +136,7 @@ extern char fetchLastErrString[MAXERRSTRING];
|
||||
extern int fetchTimeout;
|
||||
extern int fetchRestartCalls;
|
||||
|
||||
/* Extra verbosity */
|
||||
extern int fetchDebug;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user