Since I was in playing around with all the shiny bits inside anyway I
decided to fix a few spacing issues. One was in the title of the
process and a few others were in the logs. Looks like a space was added
to the front of from_to_host_str for use in other places but that kind
of made the connect logs and the process title look a little funny. I
swept that under the rug to make things a little more pretty. Feels
kind of hackish though. Maybe the space should be added where it is
needed so we don't have to take it out everywhere it isn't....
Here is the patch if you care:
diff -Npru perdition-1.19-rc5.orig2/perdition/perdition.c
perdition-1.19-rc5/perdition/perdition.c
--- perdition-1.19-rc5.orig2/perdition/perdition.c 2013-04-09
14:13:20.284668183 -0700
+++ perdition-1.19-rc5/perdition/perdition.c 2013-04-09
15:11:05.014043684 -0700
@@ -747,13 +747,14 @@ int main (int argc, char **argv, char **
/*Log the session and change the proctitle*/
if(opt.inetd_mode) {
- VANESSA_LOGGER_INFO_UNSAFE("Connect: %s inetd_pid=%d",
+ VANESSA_LOGGER_INFO_UNSAFE("Connect:%s inetd_pid=%d",
from_to_host_str, getppid());
}
else {
- VANESSA_LOGGER_INFO_UNSAFE("Connect: %s", from_to_host_str);
+ VANESSA_LOGGER_INFO_UNSAFE("Connect:%s", from_to_host_str);
}
- set_proc_title("%s: connect (%s)", progname, from_to_host_str);
+ /* Add +1 to start after the space that was put in above. */
+ set_proc_title("%s: connect (%s)", progname, from_to_host_str + 1);
#ifdef WITH_SSL_SUPPORT
if(opt.ssl_mode & SSL_MODE_SSL_LISTEN) {
@@ -769,7 +770,7 @@ int main (int argc, char **argv, char **
/*Speak to our client*/
if(protocol->greeting(client_io, GREETING_ADD_NODENAME)){
VANESSA_LOGGER_DEBUG("greeting");
- VANESSA_LOGGER_ERR_UNSAFE("Fatal error writing to client %s."
+ VANESSA_LOGGER_ERR_UNSAFE("Fatal error writing to client%s."
"Exiting child.", from_to_host_str);
perdition_exit_cleanly(-1);
}