From 749dc86410f738178414e4013cc9737f1ea1d334 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 1 Sep 2010 11:46:32 -0500 Subject: [PATCH] don't put blank 'version' attr in dialog-info packets --- src/mod/endpoints/mod_sofia/sofia_presence.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 39b495d392..d548683c9d 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -1317,11 +1317,16 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * } if (is_dialog) { + char *version = switch_event_get_header(helper->event, "event_count"); + if (!version) { + version = "0"; + } + stream.write_function(&stream, "\n" "\n", - switch_str_nil(switch_event_get_header(helper->event, "event_count")), + version, !strcasecmp(answer_state, "resubscribe") ? "partial" : "full", clean_id); }