Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated INSTALL instructions.

  • Loading branch information...
commit 633d2181f8dfaafff118aa05a89215139f0622a8 1 parent 732ef29
@forcecore forcecore authored
Showing with 11 additions and 9 deletions.
  1. +3 −7 INSTALL
  2. +8 −2 src/xfer.c
View
10 INSTALL
@@ -51,13 +51,9 @@ The simplest way to compile this package is:
all sorts of other programs in order to regenerate files that came
with the distribution.
- 6. To regenerate configure script from updated configure.ac:
- (You need to do this only if you are a developer)
- aclocal
- autoheader
- autoconf
- libtoolize
- automake
+ 6. To regenerate configure script from updated configure.ac,
+ execute autogen.sh:
+ ./autogen.sh
then do ./configure, make, make install as usual.
fakeroot debian/rules binary to generate Debian package.
View
10 src/xfer.c
@@ -303,6 +303,7 @@ nateon_xfer_sock_read(NateonXferConnection *conn, guchar **buffer)
nate_xfer->chunk_len = 0;
}
+ // Transfer complete!
if (nate_xfer->recv_len == purple_xfer_get_size(nate_xfer->prpl_xfer)) {
gchar *buf;
@@ -405,6 +406,7 @@ nateon_xfer_sock_read_cb(gpointer data, gint source, PurpleInputCondition condit
if (purple_xfer_get_type(nate_xfer->prpl_xfer) == PURPLE_XFER_RECEIVE)
{
r = nateon_xfer_sock_read(&nate_xfer->conn, &buffer);
+ printf( "JDJ: RECEIVED %d BYTES\n", r );
if (r > 0)
{
const size_t wc = fwrite(buffer, 1, r, nate_xfer->dest_fp);
@@ -418,9 +420,11 @@ nateon_xfer_sock_read_cb(gpointer data, gint source, PurpleInputCondition condit
g_free(buffer);
return;
}
+
+ // Let libpurple know the progress.
if (nate_xfer->content_type == NATEON_XFER_CONTENT_FILE)
{
- purple_xfer_set_bytes_sent(nate_xfer->prpl_xfer, nate_xfer->recv_len);
+ purple_xfer_set_bytes_sent(nate_xfer->prpl_xfer, nate_xfer->recv_len); // actually, received bytes.
purple_xfer_update_progress(nate_xfer->prpl_xfer);
}
}
@@ -572,6 +576,8 @@ nateon_xfer_send_next(NateonXfer *nate_xfer)
conn->tx_handler = -1;
return;
}
+
+ // determine chunk length.
if (purple_xfer_get_size(nate_xfer->prpl_xfer)-nate_xfer->sent_len > NATEON_XFER_SEND_BUFFER_SIZE)
{
nate_xfer->chunk_len = NATEON_XFER_SEND_BUFFER_SIZE;
@@ -1348,7 +1354,7 @@ nateon_xfer_find_transfer(
sig.prpl_xfer = &sig2;
sig.who = split[0];
sig.prpl_xfer->filename = g_strdup(filename); // Can do it /wo g_strdup
- sig.file_cookie = g_strdup(cookie); // but it emits "warning".
+ sig.file_cookie = g_strdup(cookie); // but it emits compiler warning.
node = g_list_find_custom( session->xfers, &sig, xfer_sig_cmp );
if( node )
Please sign in to comment.
Something went wrong with that request. Please try again.