]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-tp-chatroom.c
Updated.
[empathy.git] / libempathy / empathy-tp-chatroom.c
index 72f0839422416c09c8634e63e7135790ffe185f9..13b43ba37d252741b993b7277031b5d13aa986dc 100644 (file)
@@ -2,20 +2,19 @@
 /*
  * Copyright (C) 2007 Collabora Ltd.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  * 
  * Authors: Xavier Claessens <xclaesse@gmail.com>
  */
@@ -184,10 +183,10 @@ empathy_tp_chatroom_get_invitation (EmpathyTpChatroom  *chatroom,
 
        priv = GET_PRIV (chatroom);
 
-       if (*contact) {
+       if (contact) {
                *contact = priv->invitor;
        }
-       if (*message) {
+       if (message) {
                *message = priv->invit_message;
        }
 
@@ -204,6 +203,10 @@ empathy_tp_chatroom_accept_invitation (EmpathyTpChatroom *chatroom)
 
        priv = GET_PRIV (chatroom);
 
+       if (!priv->is_invited) {
+               return;
+       }
+
        /* Clear invitation data */
        priv->is_invited = FALSE;
        if (priv->invitor) {