Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ if test "x$found_static" = xyes; then
])
fi

# Is this a readonly session build?
AC_ARG_ENABLE(
session-write,
AC_HELP_STRING(--disable-session-write, create read-only sessions)
)
if test "x${enable_session_write}" = xno; then
CFLAGS="$CFLAGS -DTMATE_SESSION_RO"
fi

# Is this gcc?
AM_CONDITIONAL(IS_GCC, test "x$GCC" = xyes)

Expand Down
7 changes: 6 additions & 1 deletion tmate-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ static void handle_notify(__unused struct tmate_session *session,
struct tmate_unpacker *uk)
{
char *msg = unpack_string(uk);
tmate_status_message("%s", msg);
#ifdef TMATE_SESSION_RO
if (!strstr(msg, "session: "))
tmate_status_message("%s", msg);
#else
tmate_status_message("%s", msg);
#endif
free(msg);
}

Expand Down