summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
293e7de)
There was a single throttle timeout for all connections but the the timeout was
rearmed when SetLocation was called on a single connection. So the location was
always published to a single connection.
This patch rearm the throttle timeout after the location is published on all
connections. When an connection just appear, the throttle does not apply and
the location is published immediately on that connection.
if (priv->location == NULL)
return;
if (priv->location == NULL)
return;
- if (priv->throttle_timeout != 0)
- /* We are waiting */
- return;
-
tp_cli_connection_interface_location_call_set_location (conn, -1,
priv->location, set_location_cb, NULL, NULL, G_OBJECT (self));
tp_cli_connection_interface_location_call_set_location (conn, -1,
priv->location, set_location_cb, NULL, NULL, G_OBJECT (self));
-
- /* We won't publish during the next PUBLISH_THROTTLE seconds */
- priv->throttle_timeout = g_timeout_add_seconds (PUBLISH_THROTTLE,
- publish_throttle_timeout_cb, self);
PositionPublisherPrivate *priv = POSITION_PUBLISHER_GET_PRIVATE (self);
GSList *l;
PositionPublisherPrivate *priv = POSITION_PUBLISHER_GET_PRIVATE (self);
GSList *l;
+ if (priv->throttle_timeout != 0)
+ /* We are waiting */
+ return;
+
for (l = priv->connections; l != NULL; l = g_slist_next (l))
{
TpConnection *conn = l->data;
publish_to_conn (self, conn);
}
for (l = priv->connections; l != NULL; l = g_slist_next (l))
{
TpConnection *conn = l->data;
publish_to_conn (self, conn);
}
+
+ /* We won't publish during the next PUBLISH_THROTTLE seconds */
+ priv->throttle_timeout = g_timeout_add_seconds (PUBLISH_THROTTLE,
+ publish_throttle_timeout_cb, self);