Skip to content

Instantly share code, notes, and snippets.

@ThomasAdam
Created December 9, 2012 22:47
Show Gist options
  • Select an option

  • Save ThomasAdam/4247341 to your computer and use it in GitHub Desktop.

Select an option

Save ThomasAdam/4247341 to your computer and use it in GitHub Desktop.
diff --git a/status.c b/status.c
index 88ab68d..90887c7 100644
--- a/status.c
+++ b/status.c
@@ -429,12 +429,14 @@ status_replace1(struct client *c, struct session *s, struct winlink *wl,
if (gethostname(tmp, sizeof tmp) != 0)
fatal("gethostname failed");
ptr = tmp;
+ log_debug("[#H]: <<%s>>", tmp);
goto do_replace;
case 'h':
if (gethostname(tmp, sizeof tmp) != 0)
fatal("gethostname failed");
if ((ptr = strchr(tmp, '.')) != NULL)
*ptr = '\0';
+ log_debug("[#h]: Full: <<%s>>, Truncated: <<<%s>>", tmp, ptr);
ptr = tmp;
goto do_replace;
case 'I':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment