aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/status-provider-telepathy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/status-provider-telepathy.c b/src/status-provider-telepathy.c
index e22c27d..31da224 100644
--- a/src/status-provider-telepathy.c
+++ b/src/status-provider-telepathy.c
@@ -55,7 +55,8 @@ static mc_status_t sp_to_mc_map[] = {
/* STATUS_PROVIDER_STATUS_AWAY, */ MC_STATUS_AWAY,
/* STATUS_PROVIDER_STATUS_DND */ MC_STATUS_DND,
/* STATUS_PROVIDER_STATUS_INVISIBLE*/ MC_STATUS_HIDDEN,
- /* STATUS_PROVIDER_STATUS_OFFLINE */ MC_STATUS_OFFLINE
+ /* STATUS_PROVIDER_STATUS_OFFLINE */ MC_STATUS_OFFLINE,
+ /* STATUS_PROVIDER_STATUS_DISCONNECTED*/MC_STATUS_OFFLINE
};
typedef struct _StatusProviderTelepathyPrivate StatusProviderTelepathyPrivate;
@@ -258,10 +259,11 @@ set_status (StatusProvider * sp, StatusProviderStatus status)
static StatusProviderStatus
get_status (StatusProvider * sp)
{
+ g_return_val_if_fail(IS_STATUS_PROVIDER_TELEPATHY(sp), STATUS_PROVIDER_STATUS_DISCONNECTED);
StatusProviderTelepathyPrivate * priv = STATUS_PROVIDER_TELEPATHY_GET_PRIVATE(sp);
if (priv->proxy == NULL) {
- return mc_to_sp_map[MC_STATUS_OFFLINE];
+ return STATUS_PROVIDER_STATUS_DISCONNECTED;
}
return mc_to_sp_map[priv->mc_status];