Author: dzzinstant
Date: Mon Jun  2 00:01:13 2014
New Revision: 12

URL: http://svn.gna.org/viewcvs/pidgin-zrtp?rev=12&view=rev
Log:
ZrtpCall: secondary zrtpfilters are activated when 'SecureOn'

Modified:
    trunk/src/zrtp-conf/zrtp-call.c

Modified: trunk/src/zrtp-conf/zrtp-call.c
URL: 
http://svn.gna.org/viewcvs/pidgin-zrtp/trunk/src/zrtp-conf/zrtp-call.c?rev=12&r1=11&r2=12&view=diff
==============================================================================
--- trunk/src/zrtp-conf/zrtp-call.c     (original)
+++ trunk/src/zrtp-conf/zrtp-call.c     Mon Jun  2 00:01:13 2014
@@ -503,8 +503,6 @@
                case ZRTPINFO_RespConf2Received:
                case ZRTPINFO_RSMatchFound:
                {
-                       GList *link;
-
                        /* First zrtpfilter that establishes an encrypted 
connection will become master */
                        if (!find_master(self)) {
                                zrtp_call_set_master(self, element);
@@ -518,23 +516,26 @@
                                /* Exclude zrtpmaster from pendinglist */
                                self->zrtp_pending = 
g_list_remove(self->zrtp_pending, element);
 
-                               DEBUG_ZRTPCALL(self, 
-                                               "_statusInfo(): Iterate through 
all %d slave elements",
-                                               
g_list_length(self->zrtp_pending)); 
-                               for (link = g_list_first(self->zrtp_pending); 
link; 
-                                               link = g_list_delete_link(link, 
link)) {
-                                       GstElement *slave = link->data;
-                                       zrtp_connect_slave_cb(slave, self);
-                               }
-                               self->zrtp_pending = NULL;
                        }
                        break;
                }
                case ZRTPINFO_SecureStateOn:
+               {
+                       GList *link;
+
                        DEBUG_ZRTPCALL(self, "_handleInfo(filter=%p): security 
is set to on (subCode=%d)",
                                element, subCode);
                        zrtp_call_set_state(self, ZRTPSTATE_ENCRYPTED);
-                       break;
+                       
+                       DEBUG_ZRTPCALL(self, "_statusInfo(): Iterate through 
all %d slave elements",
+                                       g_list_length(self->zrtp_pending)); 
+                       for (link = g_list_first(self->zrtp_pending); link; 
+                                       link = g_list_delete_link(link, link)) {
+                               GstElement *slave = link->data;
+                               zrtp_connect_slave_cb(slave, self);
+                       }
+                       break;
+               }
                case ZRTPINFO_SecureStateOff:
                        zrtp_call_set_state(self, ZRTPSTATE_CLEAR);
                        zrtp_call_set_master(self, NULL);


_______________________________________________
Pidgin-zrtp-commits mailing list
Pidgin-zrtp-commits@gna.org
https://mail.gna.org/listinfo/pidgin-zrtp-commits

Reply via email to