Hello,<div>I'm having problems with the send of a file, I get almost all the file (~185KB), but at the end I don receive the last part, </div><div>I'm using a reliable agent to transfer the file, the sender send all the pieces, but the receiver don't get the last part, can it be because I have some info in some buffer in the agent that I need to flush (in this case, how I do the flush) or may be because other issue?</div>
<div><br></div><div><div>void cb_nice_recv (NiceAgent * agent, guint stream_id, guint component_id, guint len, gchar * buf, gpointer user_data) {</div><div> signal_data *dta = (signal_data *) user_data;</div><div> GError *error = NULL;</div>
<div> gsize bytes_written; </div><div> int sent=0;</div><div> GIOStatus status;</div><div> do{</div><div> status=g_io_channel_write_chars(dta->channel, buf+sent, len, &bytes_written, &error); </div>
<div> if ((status== G_IO_STATUS_NORMAL) && (len>0) && (bytes_written>0)){ </div><div> len-=bytes_written;</div><div> sent+=bytes_written;</div><div> }</div><div> }while((status== G_IO_STATUS_NORMAL) && (len>0) && (bytes_written>0)); </div>
<div> if (status!= G_IO_STATUS_NORMAL)</div><div> printf("status distinct of G_IO_STATUS_NORMAL\n");</div><div>}</div></div><div><br></div><div>We receive all the info and sent it to the channel, but the las info is not present.</div>
<div><br></div><div>We are doing an unref ("g_object_unref(data->agent);") of the agent in the sender, but the agent in the receiver side don't change state, nor NICE_COMPONENT_STATE_FAILED or NICE_COMPONENT_STATE_DISCONNECTED.</div>
<div><br></div><div>Thanks in advance,</div><div>Andrés and Federico</div><div><br></div><div><br></div>