From: Daniel Swarbrick Date: Wed, 11 Jul 2012 23:34:36 +0000 (+0200) Subject: Add FreeSWITCH-Version string and Uptime-msec (uptime in *milliseconds*) to heartbeat... X-Git-Tag: v1.2.0~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8efae998ffb90a8ae3321ec762b9adbc8fd3ab6;p=thirdparty%2Ffreeswitch.git Add FreeSWITCH-Version string and Uptime-msec (uptime in *milliseconds*) to heartbeat events --- diff --git a/src/switch_core.c b/src/switch_core.c index a0f8526813..3be5f0d818 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -82,6 +82,8 @@ static void send_heartbeat(void) duration.sec, duration.sec == 1 ? "" : "s", duration.ms, duration.ms == 1 ? "" : "s", duration.mms, duration.mms == 1 ? "" : "s"); + switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FreeSWITCH-Version", SWITCH_VERSION_FULL); + switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Uptime-msec", "%lu", switch_core_uptime() / 1000); switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Count", "%u", switch_core_session_count()); switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Max-Sessions", "%u", switch_core_session_limit(0)); switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Per-Sec", "%u", runtime.sps);