summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2012-02-24 18:43:10 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2012-02-24 19:00:45 -0500
commit4e15317ab00c4fc0b4ea16efd8eab3b479e07e22 (patch)
tree95ce8229fe40dcb0ee26b463cf02056751bb1c5a
parentccf9654e5b987a552660769d1649a93d5401acb6 (diff)
It's rawudp, so assume we're always connected
Because rawudp does not have a concept of connection.
-rw-r--r--rakia/call-channel.c12
-rw-r--r--rakia/call-stream.c3
-rw-r--r--rakia/sip-media.c8
-rw-r--r--tests/twisted/voip/calltest.py27
4 files changed, 25 insertions, 25 deletions
diff --git a/rakia/call-channel.c b/rakia/call-channel.c
index b7f29ac..080427f 100644
--- a/rakia/call-channel.c
+++ b/rakia/call-channel.c
@@ -63,6 +63,8 @@ static void rakia_call_channel_accept (TpBaseMediaCallChannel *channel);
static void rakia_call_channel_hold_state_changed (TpBaseMediaCallChannel *self,
TpLocalHoldState hold_state, TpLocalHoldStateReason hold_state_reason);
+static gboolean rakia_call_channel_is_connected (TpBaseCallChannel *self);
+
static void ended_cb (RakiaSipSession *session, gboolean self_actor,
guint status, const gchar *message, RakiaCallChannel *self);
static void ringing_cb (RakiaSipSession *session, RakiaCallChannel *self);
@@ -165,6 +167,7 @@ rakia_call_channel_class_init (
base_call_class->hangup = rakia_call_channel_hangup;
base_call_class->set_ringing = rakia_call_channel_set_ringing;
base_call_class->set_queued = rakia_call_channel_set_queued;
+ base_call_class->is_connected = rakia_call_channel_is_connected;
base_media_call_class->accept = rakia_call_channel_accept;
base_media_call_class->hold_state_changed =
@@ -663,3 +666,12 @@ remote_held_changed_cb (RakiaSipSession *session, GParamSpec *pspec,
remote_contact, TP_CALL_STATE_CHANGE_REASON_PROGRESS_MADE, "",
remote_held ? "Held by remote side" : "Unheld by remote side");
}
+
+static gboolean
+rakia_call_channel_is_connected (TpBaseCallChannel *self)
+{
+ /* We don't support ICE, so we don'T have the concept of connected-ness
+ * yet.
+ */
+ return TRUE;
+}
diff --git a/rakia/call-stream.c b/rakia/call-stream.c
index f2db669..7226b7b 100644
--- a/rakia/call-stream.c
+++ b/rakia/call-stream.c
@@ -356,9 +356,6 @@ static void rakia_call_stream_request_receiving (
rakia_sip_media_get_direction (priv->media);
TpBaseChannel *bchan = TP_BASE_CHANNEL (priv->channel);
- g_debug ("receive: %d req: %d dir:%d", receive,
- current_requested_direction, current_direction);
-
if ((!!(current_requested_direction & RAKIA_DIRECTION_RECEIVE)) == receive)
return;
diff --git a/rakia/sip-media.c b/rakia/sip-media.c
index 9f013a6..129d154 100644
--- a/rakia/sip-media.c
+++ b/rakia/sip-media.c
@@ -962,6 +962,14 @@ rakia_sip_media_is_ready (RakiaSipMedia *self)
{
RakiaSipMediaPrivate *priv = RAKIA_SIP_MEDIA_GET_PRIVATE (self);
+ MEDIA_DEBUG (self, "is_ready, requested_recv: %d can_recv: %d "
+ "local_cand_prep: %d local_codecs: %p local_inter_pending: %d",
+ priv->requested_direction & RAKIA_DIRECTION_RECEIVE,
+ priv->can_receive,
+ self->priv->local_candidates_prepared,
+ self->priv->local_codecs,
+ priv->codec_intersect_pending);
+
if (priv->requested_direction & RAKIA_DIRECTION_RECEIVE && !priv->can_receive)
return FALSE;
diff --git a/tests/twisted/voip/calltest.py b/tests/twisted/voip/calltest.py
index cc95e73..08b80e2 100644
--- a/tests/twisted/voip/calltest.py
+++ b/tests/twisted/voip/calltest.py
@@ -88,7 +88,7 @@ class CallTest:
assertEquals(True, props[cs.CHANNEL_TYPE_CALL + '.MutableContents'])
assertEquals(False, props[cs.CHANNEL_TYPE_CALL + '.HardwareStreaming'])
- def connect_endpoint(self, content, endpoint_path):
+ def check_endpoint(self, content, endpoint_path):
endpoint = self.bus.get_object(self.conn.bus_name, endpoint_path)
endpoint_props = endpoint.GetAll(cs.CALL_STREAM_ENDPOINT)
assertEquals(('',''), endpoint_props['RemoteCredentials'])
@@ -99,17 +99,6 @@ class CallTest:
endpoint_props['Transport'])
assertEquals(False, endpoint_props['IsICELite'])
- endpoint.SetEndpointState(1,
- cs.CALL_STREAM_ENDPOINT_STATE_FULLY_CONNECTED,
- dbus_interface=cs.CALL_STREAM_ENDPOINT)
- endpoint.SetEndpointState(2,
- cs.CALL_STREAM_ENDPOINT_STATE_FULLY_CONNECTED,
- dbus_interface=cs.CALL_STREAM_ENDPOINT)
-
- assertEquals({1: cs.CALL_STREAM_ENDPOINT_STATE_FULLY_CONNECTED,
- 2: cs.CALL_STREAM_ENDPOINT_STATE_FULLY_CONNECTED},
- endpoint.Get(cs.CALL_STREAM_ENDPOINT, 'EndpointState'))
-
def __add_stream (self, content, stream_path, initial, incoming):
tmpstream = self.bus.get_object (self.conn.bus_name, stream_path)
@@ -218,13 +207,13 @@ class CallTest:
EventPattern('dbus-signal', signal='RemoteMediaDescriptionsChanged'))
assertLength(1, o[0].args[0])
assertEquals([], o[0].args[1])
- self.connect_endpoint(content, o[0].args[0][0])
+ self.check_endpoint(content, o[0].args[0][0])
return content
def check_call_properties(self, call_props):
if self.incoming:
- assertEquals(cs.CALL_STATE_INITIALISING, call_props['CallState'])
+ assertEquals(cs.CALL_STATE_INITIALISED, call_props['CallState'])
else:
assertEquals(cs.CALL_STATE_PENDING_INITIATOR,
call_props['CallState'])
@@ -278,10 +267,7 @@ class CallTest:
for c in call_props['Contents']:
self.add_content(c, True)
- if self.incoming:
- o = self.q.expect('dbus-signal', signal='CallStateChanged')
- assertEquals(cs.CALL_STATE_INITIALISED, o.args[0])
- else:
+ if not self.incoming:
self.chan.Call1.Accept()
self.q.expect_many(
@@ -432,10 +418,7 @@ class CallTest:
if i.type == 'dbus-signal' and i.signal == 'EndpointsChanged':
assertLength(1, i.args[0])
assertLength(0, i.args[1])
- self.connect_endpoint(c, i.args[0][0])
-
- o = self.q.expect('dbus-signal', signal='CallStateChanged')
- assertEquals(cs.CALL_STATE_ACTIVE, o.args[0])
+ self.check_endpoint(c, i.args[0][0])
def accept(self):
if self.incoming: