Hello Edouard, > Summary: > Some patches suggested by PATCH requests. > Revision: > speedtouch--trunk--1.2--patch-6
Great. I thought my comments had gone unnoticed. Thanks. > * Added a 3rd verbose level: > - level 2 does not dump packets anymore > - level 3 == level 2 + dump packets You might also want to do the same thing for modem_run.c and pppoa2.c. I didn't bother to make the patch for pppoa2 because I don't use it, but it is of course very similar. Also it might be that modem_run is not affected (ie won't be killed when dumping packets) for a couple of reasons: 1) It does not generate as many packets as pppoa3. 2) It does not lock a report_mutex like pppoa3, which I suspect might be why pppoa3 gets killed after a while (it locks the mutex for too long when dumping packets). Maybe moving the pthread_mutex_unlock(&report_mutex) to before the call to dump fixes this problem, but I am not sure what that does to the order in which packets and other messages are logged. Here it the patch for modem_run.c: diff -pruN src.report_cleanup/modem_run.c src/modem_run.c --- src.report_cleanup/modem_run.c 2003-09-28 07:04:26.000000000 +0200 +++ src/modem_run.c 2003-09-28 07:00:08.000000000 +0200 @@ -618,7 +618,7 @@ static void usage() fprintf(stderr, "modem_run version %s: $\n", VERSION); fprintf(stderr, "usage: modem_run [-v level] [-m] -f microcode \n"); - fprintf(stderr, " -v : verbose level [0-2]\n"); + fprintf(stderr, " -v : verbose level [0-3]\n"); fprintf(stderr, " -m : monitor the line\n"); fprintf(stderr, " -s : skip the first 512 bytes read\n"); fprintf(stderr, " -f microcode : upload this microcode file first\n"); @@ -1239,7 +1239,7 @@ void report( int minlevel, unsigned int fprintf(flog, "Reason : %s\n", strerror(errno)); #endif - if(flags & REPORT_DUMP) + if(flags & REPORT_DUMP && verbose > 2) dump(buffer, length); va_end(ap); By the way, did you already have a look at my comments concerning the order of variables in report()? As said before if you think changing the parameter order (ie put the log string parameters directly after the log message indepent of whether packets will be dumped) is a good idea I am happy to create that patch. Just don't have it available yet. Bye, Leonard. -- How clean is a war when you shoot around nukelar waste? Stop the use of depleted uranium ammo! End all weapons of mass destruction. Liste de diffusion modem ALCATEL SpeedTouch USB Pour se désinscrire : mailto:[EMAIL PROTECTED]