From: Mark Michelson Date: Mon, 30 Jun 2014 18:39:56 +0000 (+0000) Subject: Reverse logic during subscription persistence recreation. X-Git-Tag: 13.0.0-beta1~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=688bb204dc872aaec9f2b829fe85039c08091b55;p=thirdparty%2Fasterisk.git Reverse logic during subscription persistence recreation. In the abstraction effort, this bit of logic got messed up. We want to recreate the persistence if things go well, not if things fail. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417663 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c index 9032bd3f62..cfda0aeb59 100644 --- a/res/res_pjsip_pubsub.c +++ b/res/res_pjsip_pubsub.c @@ -566,7 +566,7 @@ static int subscription_persistence_recreate(void *obj, void *arg, int flags) pubsub_module.id, MOD_DATA_PERSISTENCE, persistence); resp = handler->notifier->new_subscribe(endpoint, resource); - if (!PJSIP_IS_STATUS_IN_CLASS(resp, 200)) { + if (PJSIP_IS_STATUS_IN_CLASS(resp, 200)) { sub = notifier_create_subscription(handler, endpoint, &rdata, resource, generator); sub->persistence = ao2_bump(persistence); subscription_persistence_update(sub, &rdata);