From: Michael Jerris Date: Wed, 1 Sep 2010 16:46:32 +0000 (-0500) Subject: don't put blank 'version' attr in dialog-info packets X-Git-Tag: v1.2-rc1~423^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=749dc86410f738178414e4013cc9737f1ea1d334;p=thirdparty%2Ffreeswitch.git don't put blank 'version' attr in dialog-info packets --- 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); }