Commit f55c780e authored by Olivier Crête's avatar Olivier Crête

pseudotcp: Don't mix "long" and guint, one is signed, the other is unsigned

So use guint64 everywhere, this is never supposed to be negative.
parent b1fa963d
...@@ -1454,7 +1454,7 @@ static void ...@@ -1454,7 +1454,7 @@ static void
adjust_tcp_clock (NiceAgent *agent, Stream *stream, Component *component) adjust_tcp_clock (NiceAgent *agent, Stream *stream, Component *component)
{ {
if (component->tcp) { if (component->tcp) {
long timeout = component->last_clock_timeout; guint64 timeout = component->last_clock_timeout;
if (pseudo_tcp_socket_get_next_clock (component->tcp, &timeout)) { if (pseudo_tcp_socket_get_next_clock (component->tcp, &timeout)) {
if (timeout != component->last_clock_timeout) { if (timeout != component->last_clock_timeout) {
......
...@@ -190,7 +190,7 @@ struct _Component ...@@ -190,7 +190,7 @@ struct _Component
PseudoTcpSocket *tcp; PseudoTcpSocket *tcp;
GSource* tcp_clock; GSource* tcp_clock;
long last_clock_timeout; guint64 last_clock_timeout;
gboolean tcp_readable; gboolean tcp_readable;
GCancellable *tcp_writable_cancellable; GCancellable *tcp_writable_cancellable;
......
...@@ -936,7 +936,7 @@ pseudo_tcp_socket_notify_message (PseudoTcpSocket *self, ...@@ -936,7 +936,7 @@ pseudo_tcp_socket_notify_message (PseudoTcpSocket *self,
} }
gboolean gboolean
pseudo_tcp_socket_get_next_clock(PseudoTcpSocket *self, long *timeout) pseudo_tcp_socket_get_next_clock(PseudoTcpSocket *self, guint64 *timeout)
{ {
PseudoTcpSocketPrivate *priv = self->priv; PseudoTcpSocketPrivate *priv = self->priv;
guint32 now = get_current_time (); guint32 now = get_current_time ();
......
...@@ -357,7 +357,8 @@ int pseudo_tcp_socket_get_error(PseudoTcpSocket *self); ...@@ -357,7 +357,8 @@ int pseudo_tcp_socket_get_error(PseudoTcpSocket *self);
* *
* Since: 0.0.11 * Since: 0.0.11
*/ */
gboolean pseudo_tcp_socket_get_next_clock(PseudoTcpSocket *self, long *timeout); gboolean pseudo_tcp_socket_get_next_clock(PseudoTcpSocket *self,
guint64 *timeout);
/** /**
......
...@@ -220,7 +220,8 @@ static gboolean notify_clock (gpointer data) ...@@ -220,7 +220,8 @@ static gboolean notify_clock (gpointer data)
static void adjust_clock (PseudoTcpSocket *sock) static void adjust_clock (PseudoTcpSocket *sock)
{ {
long timeout = 0; guint64 timeout = 0;
if (pseudo_tcp_socket_get_next_clock (sock, &timeout)) { if (pseudo_tcp_socket_get_next_clock (sock, &timeout)) {
timeout -= g_get_monotonic_time () / 1000; timeout -= g_get_monotonic_time () / 1000;
g_debug ("Socket %p: Adjuting clock to %ld ms", sock, timeout); g_debug ("Socket %p: Adjuting clock to %ld ms", sock, timeout);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment