Changeset 14190
- Timestamp:
- Sep 8, 2013, 5:32:09 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/announcer-http.c
r14188 r14190 263 263 264 264 if (tr_variantDictFindRaw (&benc, TR_KEY_peers6, &raw, &len)) { 265 dbgmsg (data->log_name, "got a peers6 length of % zu", len);265 dbgmsg (data->log_name, "got a peers6 length of %"TR_PRIuSIZE, len); 266 266 response->pex6 = tr_peerMgrCompact6ToPex (raw, len, 267 267 NULL, 0, &response->pex6_count); … … 269 269 270 270 if (tr_variantDictFindRaw (&benc, TR_KEY_peers, &raw, &len)) { 271 dbgmsg (data->log_name, "got a compact peers length of % zu", len);271 dbgmsg (data->log_name, "got a compact peers length of %"TR_PRIuSIZE, len); 272 272 response->pex = tr_peerMgrCompactToPex (raw, len, 273 273 NULL, 0, &response->pex_count); 274 274 } else if (tr_variantDictFindList (&benc, TR_KEY_peers, &tmp)) { 275 275 response->pex = listToPex (tmp, &response->pex_count); 276 dbgmsg (data->log_name, "got a peers list with % zuentries",276 dbgmsg (data->log_name, "got a peers list with %"TR_PRIuSIZE" entries", 277 277 response->pex_count); 278 278 } -
trunk/libtransmission/announcer-udp.c
r14188 r14190 691 691 } 692 692 693 dbgmsg (tracker->key, "addr %p -- connected %d (% zu %zu) -- connecting_at %zu",693 dbgmsg (tracker->key, "addr %p -- connected %d (%"TR_PRIuSIZE" %"TR_PRIuSIZE") -- connecting_at %"TR_PRIuSIZE, 694 694 tracker->addr, 695 695 (int)(tracker->connection_expiration_time > now), (size_t)tracker->connection_expiration_time, (size_t)now, … … 872 872 struct evbuffer * buf; 873 873 874 /*fprintf (stderr, "got an incoming udp message w/len % zu\n", msglen);*/874 /*fprintf (stderr, "got an incoming udp message w/len %"TR_PRIuSIZE"\n", msglen);*/ 875 875 876 876 if (!session || !session->announcer_udp) -
trunk/libtransmission/announcer.c
r14189 r14190 1036 1036 "min_interval:%d " 1037 1037 "tracker_id_str:%s " 1038 "pex:% zu"1039 "pex6:% zu"1038 "pex:%"TR_PRIuSIZE" " 1039 "pex6:%"TR_PRIuSIZE" " 1040 1040 "err:%s " 1041 1041 "warn:%s", … … 1288 1288 /* schedule a rescrape */ 1289 1289 interval = getRetryInterval (tier->currentTracker); 1290 dbgmsg (tier, "Retrying scrape in % zuseconds.", (size_t)interval);1291 tr_logAddTorInfo (tier->tor, "Retrying scrape in % zuseconds.", (size_t)interval);1290 dbgmsg (tier, "Retrying scrape in %"TR_PRIuSIZE" seconds.", (size_t)interval); 1291 tr_logAddTorInfo (tier->tor, "Retrying scrape in %"TR_PRIuSIZE" seconds.", (size_t)interval); 1292 1292 tier->lastScrapeSucceeded = false; 1293 1293 tier->scrapeAt = get_next_scrape_time (session, tier, interval); -
trunk/libtransmission/bandwidth.c
r14171 r14190 396 396 #ifdef DEBUG_DIRECTION 397 397 if ((dir == DEBUG_DIRECTION) && (band->isLimited)) 398 fprintf (stderr, "%p consumed %5 zu bytes of %5s data... was %6zu, now %6zuleft\n",398 fprintf (stderr, "%p consumed %5"TR_PRIuSIZE" bytes of %5s data... was %6"TR_PRIuSIZE", now %6"TR_PRIuSIZE" left\n", 399 399 b, byteCount, (isPieceData?"piece":"raw"), oldBytesLeft, band->bytesLeft); 400 400 #endif -
trunk/libtransmission/cache.c
r14173 r14190 97 97 if (b->tor != ref->tor) 98 98 break; 99 //fprintf (stderr, "pos %d tor %d block % zu time %zu\n", i, b->tor->uniqueId, (size_t)b->block, (size_t)b->time);99 //fprintf (stderr, "pos %d tor %d block %"TR_PRIuSIZE" time %"TR_PRIuSIZE"\n", i, b->tor->uniqueId, (size_t)b->block, (size_t)b->time); 100 100 } 101 101 … … 442 442 tr_torGetFileBlockRange (torrent, i, &first, &last); 443 443 pos = findBlockPos (cache, torrent, first); 444 dbgmsg ("flushing file %d from cache to disk: blocks [% zu...%zu]", (int)i, (size_t)first, (size_t)last);444 dbgmsg ("flushing file %d from cache to disk: blocks [%"TR_PRIuSIZE"...%"TR_PRIuSIZE"]", (int)i, (size_t)first, (size_t)last); 445 445 446 446 /* flush out all the blocks in that file */ -
trunk/libtransmission/handshake.c
r14187 r14190 255 255 uint8_t peer_id[PEER_ID_LEN]; 256 256 257 dbgmsg (handshake, "payload: need %d, got % zu",257 dbgmsg (handshake, "payload: need %d, got %"TR_PRIuSIZE, 258 258 HANDSHAKE_SIZE, evbuffer_get_length (inbuf)); 259 259 … … 566 566 const size_t needlen = handshake->pad_d_len; 567 567 568 dbgmsg (handshake, "pad d: need % zu, got %zu",568 dbgmsg (handshake, "pad d: need %"TR_PRIuSIZE", got %"TR_PRIuSIZE, 569 569 needlen, evbuffer_get_length (inbuf)); 570 570 if (evbuffer_get_length (inbuf) < needlen) … … 594 594 uint8_t hash[SHA_DIGEST_LENGTH]; 595 595 596 dbgmsg (handshake, "payload: need %d, got % zu",596 dbgmsg (handshake, "payload: need %d, got %"TR_PRIuSIZE, 597 597 INCOMING_HANDSHAKE_LEN, evbuffer_get_length (inbuf)); 598 598 … … 735 735 int len; 736 736 737 dbgmsg (handshake, "in readYa... need %d, have % zu",737 dbgmsg (handshake, "in readYa... need %d, have %"TR_PRIuSIZE, 738 738 KEY_LEN, evbuffer_get_length (inbuf)); 739 739 if (evbuffer_get_length (inbuf) < KEY_LEN) … … 885 885 uint32_t crypto_select; 886 886 887 dbgmsg (handshake, "reading IA... have % zu, need %zu",887 dbgmsg (handshake, "reading IA... have %"TR_PRIuSIZE", need %"TR_PRIuSIZE, 888 888 evbuffer_get_length (inbuf), needlen); 889 889 if (evbuffer_get_length (inbuf) < needlen) … … 962 962 const size_t needlen = HANDSHAKE_SIZE; 963 963 964 dbgmsg (handshake, "reading payload stream... have % zu, need %zu",964 dbgmsg (handshake, "reading payload stream... have %"TR_PRIuSIZE", need %"TR_PRIuSIZE, 965 965 evbuffer_get_length (inbuf), needlen); 966 966 if (evbuffer_get_length (inbuf) < needlen) -
trunk/libtransmission/peer-io.c
r14187 r14190 417 417 418 418 rc = evbuffer_add (io->inbuf, buf, buflen); 419 dbgmsg (io, "utp_on_read got % zubytes", buflen);419 dbgmsg (io, "utp_on_read got %"TR_PRIuSIZE" bytes", buflen); 420 420 421 421 if (rc < 0) { … … 436 436 437 437 rc = evbuffer_remove (io->outbuf, buf, buflen); 438 dbgmsg (io, "utp_on_write sending % zubytes... evbuffer_remove returned %d", buflen, rc);438 dbgmsg (io, "utp_on_write sending %"TR_PRIuSIZE" bytes... evbuffer_remove returned %d", buflen, rc); 439 439 assert (rc == (int)buflen); /* if this fails, we've corrupted our bookkeeping somewhere */ 440 440 if (rc < (long)buflen) { … … 454 454 bytes = tr_bandwidthClamp (&io->bandwidth, TR_DOWN, UTP_READ_BUFFER_SIZE); 455 455 456 dbgmsg (io, "utp_get_rb_size is saying it's ready to read % zubytes", bytes);456 dbgmsg (io, "utp_get_rb_size is saying it's ready to read %"TR_PRIuSIZE" bytes", bytes); 457 457 return UTP_READ_BUFFER_SIZE - bytes; 458 458 } … … 515 515 assert (tr_isPeerIo (io)); 516 516 517 dbgmsg (io, "utp_on_overhead -- count is % zu", count);517 dbgmsg (io, "utp_on_overhead -- count is %"TR_PRIuSIZE, count); 518 518 519 519 tr_bandwidthUsed (&io->bandwidth, send ? TR_UP : TR_DOWN, … … 1270 1270 int n = 0; 1271 1271 const size_t old_len = evbuffer_get_length (io->outbuf); 1272 dbgmsg (io, "in tr_peerIoTryWrite % zu", howmuch);1272 dbgmsg (io, "in tr_peerIoTryWrite %"TR_PRIuSIZE, howmuch); 1273 1273 1274 1274 if (howmuch > old_len) … … 1323 1323 bytesUsed = tr_peerIoTryWrite (io, limit); 1324 1324 1325 dbgmsg (io, "flushing peer-io, direction %d, limit % zu, bytesUsed %d", (int)dir, limit, bytesUsed);1325 dbgmsg (io, "flushing peer-io, direction %d, limit %"TR_PRIuSIZE", bytesUsed %d", (int)dir, limit, bytesUsed); 1326 1326 return bytesUsed; 1327 1327 } -
trunk/libtransmission/peer-msgs.c
r14189 r14190 334 334 dbgOutMessageLen (tr_peerMsgs * msgs) 335 335 { 336 dbgmsg (msgs, "outMessage size is now % zu", evbuffer_get_length (msgs->outMessages));336 dbgmsg (msgs, "outMessage size is now %"TR_PRIuSIZE, evbuffer_get_length (msgs->outMessages)); 337 337 } 338 338 … … 904 904 { 905 905 struct peer_request req; 906 /*fprintf (stderr, "SENDING CANCEL MESSAGE FOR BLOCK % zu\n\t\tFROM PEER %p ------------------------------------\n", (size_t)block, msgs->peer);*/906 /*fprintf (stderr, "SENDING CANCEL MESSAGE FOR BLOCK %"TR_PRIuSIZE"\n\t\tFROM PEER %p ------------------------------------\n", (size_t)block, msgs->peer);*/ 907 907 blockToReq (msgs->torrent, block, &req); 908 908 protocolSendCancel (msgs, &req); … … 1292 1292 tr_peerIoReadUint8 (msgs->io, inbuf, &id); 1293 1293 msgs->incoming.id = id; 1294 dbgmsg (msgs, "msgs->incoming.id is now %d; msgs->incoming.length is % zu", id, (size_t)msgs->incoming.length);1294 dbgmsg (msgs, "msgs->incoming.id is now %d; msgs->incoming.length is %"TR_PRIuSIZE, id, (size_t)msgs->incoming.length); 1295 1295 1296 1296 if (id == BT_PIECE) … … 1455 1455 fireClientGotPieceData (msgs, n); 1456 1456 *setme_piece_bytes_read += n; 1457 dbgmsg (msgs, "got % zubytes for block %u:%u->%u ... %d remain",1457 dbgmsg (msgs, "got %"TR_PRIuSIZE" bytes for block %u:%u->%u ... %d remain", 1458 1458 n, req->index, req->offset, req->length, 1459 1459 (int)(req->length - evbuffer_get_length (block_buffer))); … … 1487 1487 --msglen; /* id length */ 1488 1488 1489 dbgmsg (msgs, "got BT id %d, len %d, buffer size is % zu", (int)id, (int)msglen, inlen);1489 dbgmsg (msgs, "got BT id %d, len %d, buffer size is %"TR_PRIuSIZE, (int)id, (int)msglen, inlen); 1490 1490 1491 1491 if (inlen < msglen) … … 1748 1748 const size_t inlen = evbuffer_get_length (in); 1749 1749 1750 dbgmsg (msgs, "canRead: inlen is % zu, msgs->state is %d", inlen, msgs->state);1750 dbgmsg (msgs, "canRead: inlen is %"TR_PRIuSIZE", msgs->state is %d", inlen, msgs->state); 1751 1751 1752 1752 if (!inlen) … … 1916 1916 if (haveMessages && !msgs->outMessagesBatchedAt) /* fresh batch */ 1917 1917 { 1918 dbgmsg (msgs, "started an outMessages batch (length is % zu)", evbuffer_get_length (msgs->outMessages));1918 dbgmsg (msgs, "started an outMessages batch (length is %"TR_PRIuSIZE")", evbuffer_get_length (msgs->outMessages)); 1919 1919 msgs->outMessagesBatchedAt = now; 1920 1920 } … … 1923 1923 const size_t len = evbuffer_get_length (msgs->outMessages); 1924 1924 /* flush the protocol messages */ 1925 dbgmsg (msgs, "flushing outMessages... to %p (length is % zu)", msgs->io, len);1925 dbgmsg (msgs, "flushing outMessages... to %p (length is %"TR_PRIuSIZE")", msgs->io, len); 1926 1926 tr_peerIoWriteBuf (msgs->io, msgs->outMessages, false); 1927 1927 msgs->clientSentAnythingAt = now; … … 2030 2030 if (!err && tr_torrentPieceNeedsCheck (msgs->torrent, req.index)) 2031 2031 if ((err = !tr_torrentCheckPiece (msgs->torrent, req.index))) 2032 tr_torrentSetLocalError (msgs->torrent, _("Please Verify Local Data! Piece #% zuis corrupt."), (size_t)req.index);2032 tr_torrentSetLocalError (msgs->torrent, _("Please Verify Local Data! Piece #%"TR_PRIuSIZE" is corrupt."), (size_t)req.index); 2033 2033 2034 2034 if (err) … … 2131 2131 evbuffer_add_uint8 (out, BT_BITFIELD); 2132 2132 evbuffer_add (out, bytes, byte_count); 2133 dbgmsg (msgs, "sending bitfield... outMessage size is now % zu", evbuffer_get_length (out));2133 dbgmsg (msgs, "sending bitfield... outMessage size is now %"TR_PRIuSIZE, evbuffer_get_length (out)); 2134 2134 pokeBatchPeriod (msgs, IMMEDIATE_PRIORITY_INTERVAL_SECS); 2135 2135 … … 2426 2426 evbuffer_add_buffer (out, payload); 2427 2427 pokeBatchPeriod (msgs, HIGH_PRIORITY_INTERVAL_SECS); 2428 dbgmsg (msgs, "sending a pex message; outMessage size is now % zu", evbuffer_get_length (out));2428 dbgmsg (msgs, "sending a pex message; outMessage size is now %"TR_PRIuSIZE, evbuffer_get_length (out)); 2429 2429 dbgOutMessageLen (msgs); 2430 2430 -
trunk/libtransmission/resume.c
r14136 r14190 165 165 else 166 166 { 167 tr_logAddTorDbg (tor, "Couldn't load DND flags. DND list (%p) has % zuchildren; torrent has %d files",167 tr_logAddTorDbg (tor, "Couldn't load DND flags. DND list (%p) has %"TR_PRIuSIZE" children; torrent has %d files", 168 168 list, tr_variantListSize (list), (int)n); 169 169 } -
trunk/libtransmission/rpc-server.c
r14172 r14190 388 388 389 389 #if 0 390 fprintf (stderr, "compressed response is %.2f of original (raw==% zu bytes; compressed==%zu)\n",390 fprintf (stderr, "compressed response is %.2f of original (raw==%"TR_PRIuSIZE" bytes; compressed==%"TR_PRIuSIZE")\n", 391 391 (double)evbuffer_get_length (out)/content_len, 392 392 content_len, evbuffer_get_length (out)); -
trunk/libtransmission/rpcimpl.c
r14169 r14190 1634 1634 struct add_torrent_idle_data * data = user_data; 1635 1635 1636 dbgmsg ("torrentAdd: HTTP response code was %ld (%s); response length was % zubytes",1636 dbgmsg ("torrentAdd: HTTP response code was %ld (%s); response length was %"TR_PRIuSIZE" bytes", 1637 1637 response_code, tr_webGetResponseStr (response_code), response_byte_count); 1638 1638 -
trunk/libtransmission/session.c
r14187 r14190 677 677 usec = min; 678 678 tr_timerAdd (session->nowTimer, 0, usec); 679 /* fprintf (stderr, "time % zu sec, %zumicrosec\n", (size_t)tr_time (), (size_t)tv.tv_usec); */679 /* fprintf (stderr, "time %"TR_PRIuSIZE" sec, %"TR_PRIuSIZE" microsec\n", (size_t)tr_time (), (size_t)tv.tv_usec); */ 680 680 } 681 681 … … 1869 1869 assert (tr_isSession (session)); 1870 1870 1871 dbgmsg ("shutting down transmission session %p... now is % zu, deadline is %zu", session, (size_t)time (NULL), (size_t)deadline);1871 dbgmsg ("shutting down transmission session %p... now is %"TR_PRIuSIZE", deadline is %"TR_PRIuSIZE, session, (size_t)time (NULL), (size_t)deadline); 1872 1872 1873 1873 /* close the session */ … … 1886 1886 && !deadlineReached (deadline)) 1887 1887 { 1888 dbgmsg ("waiting on port unmap (%p) or announcer (%p)... now % zu deadline %zu",1888 dbgmsg ("waiting on port unmap (%p) or announcer (%p)... now %"TR_PRIuSIZE" deadline %"TR_PRIuSIZE, 1889 1889 session->shared, session->announcer, (size_t)time (NULL), (size_t)deadline); 1890 1890 tr_wait_msec (50); … … 1898 1898 { 1899 1899 static bool forced = false; 1900 dbgmsg ("waiting for libtransmission thread to finish... now % zu deadline %zu", (size_t)time (NULL), (size_t)deadline);1900 dbgmsg ("waiting for libtransmission thread to finish... now %"TR_PRIuSIZE" deadline %"TR_PRIuSIZE, (size_t)time (NULL), (size_t)deadline); 1901 1901 tr_wait_msec (100); 1902 1902 -
trunk/libtransmission/torrent.c
r14188 r14190 563 563 564 564 if (allAreSeeds) 565 tr_logAddTorDbg (tor, "Got % zuseeds from tracker", event->pexCount);565 tr_logAddTorDbg (tor, "Got %"TR_PRIuSIZE" seeds from tracker", event->pexCount); 566 566 else 567 tr_logAddTorDbg (tor, "Got % zupeers from tracker", event->pexCount);567 tr_logAddTorDbg (tor, "Got %"TR_PRIuSIZE" peers from tracker", event->pexCount); 568 568 569 569 for (i = 0; i < event->pexCount; ++i) … … 2573 2573 const bool pass = tr_ioTestPiece (tor, pieceIndex); 2574 2574 2575 tr_deeplog_tor (tor, "[LAZY] tr_torrentCheckPiece tested piece % zu, pass==%d", (size_t)pieceIndex, (int)pass);2575 tr_deeplog_tor (tor, "[LAZY] tr_torrentCheckPiece tested piece %"TR_PRIuSIZE", pass==%d", (size_t)pieceIndex, (int)pass); 2576 2576 tr_torrentSetHasPiece (tor, pieceIndex, pass); 2577 2577 tr_torrentSetPieceChecked (tor, pieceIndex); … … 3241 3241 if (tr_torrentPieceIsComplete (tor, p)) 3242 3242 { 3243 tr_logAddTorDbg (tor, "[LAZY] checking just-completed piece % zu", (size_t)p);3243 tr_logAddTorDbg (tor, "[LAZY] checking just-completed piece %"TR_PRIuSIZE, (size_t)p); 3244 3244 3245 3245 if (tr_torrentCheckPiece (tor, p)) -
trunk/libtransmission/tr-utp.c
r13868 r14190 66 66 UTP_Write (struct UTPSocket *socket, size_t count) 67 67 { 68 tr_logAddNamedError (MY_NAME, "UTP_RBDrained (%p, % zu) was called.", socket, count);69 dbgmsg ("UTP_RBDrained (%p, % zu) was called.", socket, count);68 tr_logAddNamedError (MY_NAME, "UTP_RBDrained (%p, %"TR_PRIuSIZE") was called.", socket, count); 69 dbgmsg ("UTP_RBDrained (%p, %"TR_PRIuSIZE") was called.", socket, count); 70 70 assert (0); /* FIXME: this is too much for the long term, but probably needed in the short term */ 71 71 return false; -
trunk/libtransmission/transmission.h
r14188 r14190 81 81 #else 82 82 #define PRIu32 "lu" 83 #endif 84 #endif 85 86 #ifndef TR_PRIuSIZE 87 #ifdef _MSC_VER 88 #define TR_PRIuSIZE "Iu" 89 #else 90 #define TR_PRIuSIZE "zu" 83 91 #endif 84 92 #endif -
trunk/libtransmission/variant-benc.c
r13968 r14190 298 298 const char * str; 299 299 tr_variantGetStr (v, &str, &len); 300 evbuffer_add_printf (evbuf, "% zu:", len);300 evbuffer_add_printf (evbuf, "%"TR_PRIuSIZE":", len); 301 301 evbuffer_add (evbuf, str, len); 302 302 } -
trunk/libtransmission/variant-json.c
r13868 r14190 92 92 if (data->source) 93 93 { 94 tr_logAddError ("JSON parse failed in %s at pos % zu: %s -- remaining text \"%.16s\"",94 tr_logAddError ("JSON parse failed in %s at pos %"TR_PRIuSIZE": %s -- remaining text \"%.16s\"", 95 95 data->source, 96 96 jsn->pos, … … 100 100 else 101 101 { 102 tr_logAddError ("JSON parse failed at pos % zu: %s -- remaining text \"%.16s\"",102 tr_logAddError ("JSON parse failed at pos %"TR_PRIuSIZE": %s -- remaining text \"%.16s\"", 103 103 jsn->pos, 104 104 jsonsl_strerror (error), -
trunk/libtransmission/web.c
r14188 r14190 134 134 135 135 evbuffer_add (task->response, ptr, byteCount); 136 dbgmsg ("wrote % zubytes to task %p's buffer", byteCount, task);136 dbgmsg ("wrote %"TR_PRIuSIZE" bytes to task %p's buffer", byteCount, task); 137 137 return byteCount; 138 138 } -
trunk/utils/edit.c
r13868 r14190 280 280 tr_variant * tier = tr_variantListAddList (announce_list, 1); 281 281 tr_variantListAddStr (tier, url); 282 printf ("\tAdded \"%s\" to \"announce-list\" tier % zu\n", url, tr_variantListSize (announce_list));282 printf ("\tAdded \"%s\" to \"announce-list\" tier %"TR_PRIuSIZE"\n", url, tr_variantListSize (announce_list)); 283 283 changed = true; 284 284 }
Note: See TracChangeset
for help on using the changeset viewer.