Changeset 40
- Timestamp:
- Jan 22, 2006, 2:06:42 AM (17 years ago)
- Location:
- branches/oneport
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/oneport/gtk/prefs.c
r22 r40 162 162 cf_setpref(PREF_PORT, strnum, NULL); 163 163 g_free(strnum); 164 /* XXX should I change the port here? is it even possible? */165 164 166 165 /* save uselimit pref */ … … 181 180 } 182 181 182 tr_setBindPort(data->tr, gtk_spin_button_get_value_as_int(data->port)); 183 183 setlimit(data->tr); 184 184 } -
branches/oneport/libtransmission/inout.c
r20 r40 391 391 { 392 392 /* Should not happen */ 393 tr_err( "readOrWriteBytes: offset out of range" ); 393 tr_err( "readOrWriteBytes: offset out of range (off=%llu files=%i i=%i)", 394 offset, inf->fileCount, i); 395 for(i = 0; i < inf->fileCount; i++) 396 tr_err( "file %i %lld %s", i, inf->files[i].length, inf->files[i].name ); 394 397 goto fail; 395 398 } -
branches/oneport/libtransmission/net.c
r26 r40 134 134 sizeof( struct sockaddr_in ) ) ) 135 135 { 136 tr_err( "Could not bind port %d ", port);136 tr_err( "Could not bind port %d: %s", port, strerror(errno) ); 137 137 tr_netClose( s ); 138 138 return -1; -
branches/oneport/libtransmission/tracker.c
r39 r40 359 359 if( i >= tc->pos - 18 ) 360 360 { 361 tr_err( "Tracker: no dictionary in answer (%s)",362 tc->tor->info.trackerAddress );361 //tr_err( "Tracker: no dictionary in answer (%s)", 362 // tc->tor->info.trackerAddress ); 363 363 // printf( "%s\n", tc->buf ); 364 364 return; -
branches/oneport/libtransmission/transmission.c
r39 r40 101 101 int ii, sock; 102 102 103 printf("changing port from %i to %i\n", h->bindPort, port); 104 103 105 if( h->bindPort == port ) 104 106 return; … … 632 634 uint8_t * hash; 633 635 #ifdef PORT_DEBUG 634 int old socket;636 int oldport, oldsocket; 635 637 int oldPeerCount; 636 638 tr_peer_t * oldPeers[TR_MAX_PEER_COUNT]; … … 648 650 649 651 #ifdef PORT_DEBUG 652 oldport = h->bindPort; 650 653 oldsocket = h->bindSocket; 651 654 #endif … … 678 681 if( tr_peerRead( NULL, h->acceptPeers[ii] ) ) 679 682 { 680 printf( "failed to read from peer on new port \n");683 printf( "failed to read from peer on new port %i\n", h->bindPort ); 681 684 tr_peerDestroy( h->fdlimit, h->acceptPeers[ii] ); 682 685 goto removePeer; … … 690 693 SHA_DIGEST_LENGTH ) ) 691 694 { 692 printf( "got peer on new port for \"%s\"\n",693 h-> torrents[jj]->info.name );695 printf( "got peer on new port %i for \"%s\"\n", 696 h->bindPort, h->torrents[jj]->info.name ); 694 697 tr_peerAttach( h->torrents[jj], h->acceptPeers[ii] ); 695 698 tr_lockUnlock( &h->torrents[jj]->lock ); … … 698 701 tr_lockUnlock( &h->torrents[jj]->lock ); 699 702 } 700 printf( "failed to match hash for peer on new port \n");703 printf( "failed to match hash for peer on new port %i\n", h->bindPort ); 701 704 tr_peerDestroy( h->fdlimit, h->acceptPeers[ii] ); 702 705 goto removePeer; … … 711 714 712 715 #ifdef PORT_DEBUG 716 if( oldsocket != h->bindSocket) { 713 717 /* Check for incoming connections */ 714 718 if( oldsocket > -1 && … … 734 738 if( tr_peerRead( NULL, oldPeers[ii] ) ) 735 739 { 736 printf( "failed to read from peer on old port \n");740 printf( "failed to read from peer on old port %i\n", oldport ); 737 741 tr_peerDestroy( h->fdlimit, oldPeers[ii] ); 738 742 goto removeOldPeer; … … 746 750 SHA_DIGEST_LENGTH ) ) 747 751 { 748 printf( "got peer on old port for \"%s\"\n",749 h->torrents[jj]->info.name );752 printf( "got peer on old port %i for \"%s\"\n", 753 oldport, h->torrents[jj]->info.name ); 750 754 tr_lockUnlock( &h->torrents[jj]->lock ); 751 755 goto removeOldPeer; … … 753 757 tr_lockUnlock( &h->torrents[jj]->lock ); 754 758 } 755 printf( "failed to match hash for peer on old port \n");759 printf( "failed to match hash for peer on old port %i\n", oldport ); 756 760 tr_peerDestroy( h->fdlimit, oldPeers[ii] ); 757 761 goto removeOldPeer; … … 764 768 ( oldPeerCount - ii ) * sizeof( tr_peer_t * ) ); 765 769 } 770 } 766 771 #endif 767 772 -
branches/oneport/libtransmission/utils.h
r7 r40 30 30 #define tr_inf( a... ) tr_msg( TR_MSG_INF, ## a ) 31 31 #define tr_dbg( a... ) tr_msg( TR_MSG_DBG, ## a ) 32 void tr_msg ( int level, char * msg, ... ) ;32 void tr_msg ( int level, char * msg, ... ) __attribute__ ((format (printf, 2, 3))); 33 33 34 34 int tr_rand ( int );
Note: See TracChangeset
for help on using the changeset viewer.