From c212173648d847a4e17ed07c332ce3e9ed62be50 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 8 Aug 2013 11:36:49 +0200 Subject: [PATCH] Upnp: add blacklisted state --- coreapi/linphonecore.h | 1 + coreapi/upnp.c | 2 +- java/common/org/linphone/core/LinphoneCore.java | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 93ab0ca88..1f4f71e6b 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -306,6 +306,7 @@ enum _LinphoneUpnpState{ LinphoneUpnpStateNotAvailable, /**< uPnP is not available */ LinphoneUpnpStateOk, /**< uPnP is enabled */ LinphoneUpnpStateKo, /**< uPnP processing has failed */ + LinphoneUpnpStateBlacklisted, /**< IGD router is blacklisted */ }; /** diff --git a/coreapi/upnp.c b/coreapi/upnp.c index cd9e14b31..adbd377ac 100644 --- a/coreapi/upnp.c +++ b/coreapi/upnp.c @@ -229,7 +229,7 @@ void linphone_upnp_igd_callback(void *cookie, upnp_igd_event event, void *arg) { lupnp->state = LinphoneUpnpStateNotAvailable; } else if(blacklisted) { ms_message("uPnP IGD: Router is blacklisted"); - lupnp->state = LinphoneUpnpStateNotAvailable; + lupnp->state = LinphoneUpnpStateBlacklisted; } else { ms_message("uPnP IGD: Connected"); lupnp->state = LinphoneUpnpStateOk; diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index d76acad9a..8219e8d95 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -327,6 +327,11 @@ public interface LinphoneCore { * Ko */ static public UpnpState Ko = new UpnpState(6, "Ko"); + /** + * Blacklisted + */ + static public UpnpState Blacklisted = new UpnpState(6, "Blacklisted"); + protected final int mValue; private final String mStringValue;