On Fri, Dec 19, 2008 at 12:18:04AM +0000, Charlie Von Metzradt wrote:
As far as I can remember, the logging was done in swrite, so that we were able to log all terminal writes, not just ones sent from hey.
Aye, twas. I'd rather avoid doing it that way though.
It might be more helpful to send the output of diff -u, so we can see changes in a standard format we're more familiar with. :)
I like red. Each to their own... --- hey_main.c 2008-12-18 23:51:20.784079601 +0000 +++ ../../twins-package/c-hey/hey_main.c 2004-02-19 21:50:34.000000000 +0000 @@ -15,11 +15,6 @@ #include "hey_edit.h" #include "aux.h" -/* added for logging */ -#include <syslog.h> -#include <pwd.h> -/* end logging additions */ - #define COMMANDLEN 64 /* the initial mesg status */ @@ -150,13 +145,10 @@ if (u->tty[0]) strncat(command, u->tty, COMMANDLEN - 1); if (!(pipe = popen(command, "w"))) printerr_exit("hey: couldn't open pipe to write.\n"); - - int linecount=-2; /* Print out the page to write */ do { fprintf(pipe, "%s\n", ptr); - linecount++; } while ((ptr = dyn_pageRead(NULL))); /* Close the pipe */ @@ -165,16 +157,6 @@ exit(1); } - - /* Log this */ - struct passwd *passwd; /* man getpwuid */ - passwd = getpwuid ( getuid()); - - syslog (LOG_MAKEPRI(LOG_USER, LOG_INFO), - "%s send %d line(s) to %s ", passwd->pw_name, linecount, u->name); - /* end new logging code */ - - /* Success message */ printf("hey: %s", u->name); if (u->tty[0]) printf(".%s", u->tty); -- Andrew Harford System Administrator, DCU Networking Society Equipment Officer, Societies & Publications Committee Never do today that which will become someone else's responsibility tomorrow. --David Brent