Commit 241f5af1 authored by Olivier Crête's avatar Olivier Crête
Browse files

pseudotcp: Make debug more useful

parent eec0827a
......@@ -3704,6 +3704,7 @@ pseudo_tcp_socket_condition_check (PseudoTcpSocket *self,
g_rec_mutex_lock (&self->priv->mutex);
#if 0
DEBUG (PSEUDO_TCP_DEBUG_NORMAL,
"Socket %p conditions: has_sent_fin: %u, has_received_fin: %u, "
"get_available_bytes: %d, get_available_send_space: %" G_GSIZE_FORMAT,
......@@ -3711,6 +3712,7 @@ pseudo_tcp_socket_condition_check (PseudoTcpSocket *self,
pseudo_tcp_state_has_received_fin (priv->state),
pseudo_tcp_socket_get_available_bytes (self),
pseudo_tcp_socket_get_available_send_space (self));
#endif
if (priv->state == TCP_CLOSED)
retval |= G_IO_HUP;
......@@ -3782,8 +3784,10 @@ pseudo_tcp_source_update (PseudoTcpSocket *self,
pseudo_tcp_source->condition_mask);
}
#if 0
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "Updating source %p conditions to %u.",
pseudo_tcp_source, available_conditions);
#endif
/* Calculate condition from the PseudoTcpSocket */
prev_pending_condition = pseudo_tcp_source->pending_condition;
......@@ -3793,12 +3797,16 @@ pseudo_tcp_source_update (PseudoTcpSocket *self,
* dispatches. */
if (pseudo_tcp_source->pending_condition != prev_pending_condition) {
if (pseudo_tcp_source->pending_condition) {
#if 0
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "Scheduling source %p.",
pseudo_tcp_source);
#endif
g_source_set_ready_time ((GSource *) pseudo_tcp_source, 0);
} else {
#if 0
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "Unscheduling source %p.",
pseudo_tcp_source);
#endif
g_source_set_ready_time ((GSource *) pseudo_tcp_source, -1);
}
}
......
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