diff options
-rw-r--r-- | libindicate/server.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libindicate/server.c b/libindicate/server.c index 4e47040..e6041de 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -488,6 +488,10 @@ get_next_id (IndicateServer * server) static gboolean show_interest (IndicateServer * server, gchar * sender, IndicateInterests interest) { + if (!(interest > INDICATE_INTEREST_NONE && interest < INDICATE_INTEREST_LAST)) { + return FALSE; + } + /* g_debug("Someone is showing interest. %s in %d", sender, interest); */ IndicateServerInterestedFolk localfolk; localfolk.sender = sender; @@ -516,6 +520,10 @@ show_interest (IndicateServer * server, gchar * sender, IndicateInterests intere static gboolean remove_interest (IndicateServer * server, gchar * sender, IndicateInterests interest) { + if (!(interest > INDICATE_INTEREST_NONE && interest < INDICATE_INTEREST_LAST)) { + return FALSE; + } + IndicateServerInterestedFolk localfolk; localfolk.sender = sender; |