1) Add force-publish-expires to set custom presence update expires delta (-1 means endless)

2) Check how many users are registered when receiving a PUBLISH AND Multiple Registrations is enabled:
	if there is more than just 1 AND you are sending a offline message: skip publishing it to everyone
	to prevent clients from thinking themselves has gone offline.
This commit is contained in:
Anthony Minessale
2010-10-21 12:50:19 -05:00
parent b430da3584
commit fd1736b38f
3 changed files with 58 additions and 25 deletions
+10
View File
@@ -2428,6 +2428,11 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
if (tmp > 0) {
profile->force_subscription_expires = tmp;
}
} else if (!strcasecmp(var, "force-publish-expires")) {
int tmp = atoi(val);
if (tmp > 0) {
profile->force_publish_expires = tmp;
}
} else if (!strcasecmp(var, "inbound-late-negotiation")) {
if (switch_true(val)) {
sofia_set_flag(profile, TFLAG_LATE_NEGOTIATION);
@@ -3104,6 +3109,11 @@ switch_status_t config_sofia(int reload, char *profile_name)
if (tmp > 0) {
profile->force_subscription_expires = tmp;
}
} else if (!strcasecmp(var, "force-publish-expires")) {
int tmp = atoi(val);
if (tmp > 0) {
profile->force_publish_expires = tmp;
}
} else if (!strcasecmp(var, "send-message-query-on-register")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_MESSAGE_QUERY_ON_REGISTER);