commit - 684f094bd5486f616a55af9643414d29dcd6eaca
commit + 5ae14b292cd623e5706b501d92a926c2308ba1b6
blob - 0f92638b13967c3e742d3d69e1f190a470ecd26e
blob + 8819e3f487dd12b7c4961c3adef29dd13745cbea
--- gotwebd/gotwebd.c
+++ gotwebd/gotwebd.c
static int
spawn_socket_process(struct gotwebd *env, const char *argv0, int n)
{
- const char *argv[5];
+ const char *argv[6];
int argc = 0;
int p[2];
pid_t pid;
argv[argc++] = "-S";
if (env->gotwebd_debug)
argv[argc++] = "-d";
- if (env->gotwebd_verbose)
+ if (env->gotwebd_verbose > 0)
argv[argc++] = "-v";
+ if (env->gotwebd_verbose > 1)
+ argv[argc++] = "-v";
argv[argc] = NULL;
if (p[0] != GOTWEBD_SOCK_FILENO) {
server_proc = 1;
break;
case 'v':
- env->gotwebd_verbose++;
+ if (env->gotwebd_verbose < 3)
+ env->gotwebd_verbose++;
break;
default:
usage();
blob - a6d1b73d3885dd6d04013a9bd11b8b18a750a0c3
blob + 61675f1d06e88c369b66f7c464159a8bb19ba241
--- lib/log.c
+++ lib/log.c
{
va_list ap;
- va_start(ap, emsg);
- vlog(LOG_INFO, emsg, ap);
- va_end(ap);
+ if (verbose > 0) {
+ va_start(ap, emsg);
+ vlog(LOG_INFO, emsg, ap);
+ va_end(ap);
+ }
}
void
{
va_list ap;
- if (verbose) {
+ if (verbose > 1) {
va_start(ap, emsg);
vlog(LOG_DEBUG, emsg, ap);
va_end(ap);