Changeset 5065
- Timestamp:
- Feb 19, 2008, 4:16:04 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/main.c
r5064 r5065 24 24 25 25 #include <sys/param.h> 26 #include <errno.h>27 26 #include <signal.h> 28 27 #include <string.h> -
trunk/gtk/tr_torrent.c
r5064 r5065 23 23 *****************************************************************************/ 24 24 25 #include <errno.h>26 25 #include <string.h> 27 26 #include <unistd.h> -
trunk/gtk/util.c
r5015 r5065 25 25 #include <sys/types.h> 26 26 #include <sys/stat.h> 27 #include <errno.h>28 27 #include <signal.h> 29 28 #include <stdarg.h> -
trunk/libtransmission/fastresume.c
r5014 r5065 43 43 44 44 #include <assert.h> 45 #include <errno.h>46 45 #include <stdio.h> 47 46 #include <stdlib.h> -
trunk/libtransmission/fdlimit.c
r4856 r5065 164 164 if( file->fd == -1 ) { 165 165 const int err = errno; 166 tr_err( "Couldn't open '%s': %s", filename, strerror(err) );166 tr_err( "Couldn't open '%s': %s", filename, tr_strerror(err) ); 167 167 return tr_ioErrorFromErrno( err ); 168 168 } … … 388 388 if( isReserved || ( gFd->normal < getSocketMax( gFd ) ) ) 389 389 if( ( s = socket( AF_INET, type, 0 ) ) < 0 ) 390 tr_err( "Couldn't create socket (%s)", strerror( sockerrno ) );390 tr_err( "Couldn't create socket (%s)", tr_strerror( sockerrno ) ); 391 391 392 392 if( s > -1 ) -
trunk/libtransmission/handshake.c
r4735 r5065 1025 1025 { 1026 1026 dbgmsg( handshake, "libevent got an error what==%d, errno=%d (%s)", 1027 (int)what, errno, strerror(errno) );1027 (int)what, errno, tr_strerror(errno) ); 1028 1028 tr_handshakeDone( handshake, FALSE ); 1029 1029 } -
trunk/libtransmission/inout.c
r5045 r5065 12 12 13 13 #include <assert.h> 14 #include <errno.h> 14 15 #include <stdlib.h> 15 16 #include <string.h> -
trunk/libtransmission/makemeta.c
r4404 r5065 58 58 i = stat( buf, &sb ); 59 59 if( i ) { 60 tr_err("makemeta couldn't stat \"%s\"; skipping. (%s)", buf, strerror(errno));60 tr_err("makemeta couldn't stat \"%s\"; skipping. (%s)", buf, tr_strerror(errno)); 61 61 return list; 62 62 } -
trunk/libtransmission/metainfo.c
r5052 r5065 615 615 if( !file ) 616 616 { 617 tr_err( "Could not open file (%s) (%s)", path, strerror( errno ) );617 tr_err( "Could not open file (%s) (%s)", path, tr_strerror( errno ) ); 618 618 return TR_EINVALID; 619 619 } … … 621 621 if( fwrite( buf, 1, buflen, file ) != buflen ) 622 622 { 623 tr_err( "Could not write file (%s) (%s)", path, strerror( errno ) );623 tr_err( "Could not write file (%s) (%s)", path, tr_strerror( errno ) ); 624 624 fclose( file ); 625 625 return TR_EINVALID; -
trunk/libtransmission/natpmp.c
r4599 r5065 15 15 #include <time.h> 16 16 #include <inttypes.h> 17 #include <string.h> /* strerror */18 17 19 18 #ifdef WIN32 … … 71 70 tr_dbg( KEY "%s returned success (%d)", func, ret ); 72 71 else 73 tr_err( KEY "%s returned error %d, errno is %d (%s)", func, ret, errno, strerror(errno) );72 tr_err( KEY "%s returned error %d, errno is %d (%s)", func, ret, errno, tr_strerror(errno) ); 74 73 } 75 74 -
trunk/libtransmission/net.c
r4600 r5065 94 94 { 95 95 tr_err( "Couldn't set socket to non-blocking mode (%s)", 96 strerror( sockerrno ) );96 tr_strerror( sockerrno ) ); 97 97 tr_netClose( fd ); 98 98 fd = -1; … … 135 135 tr_err( "Couldn't connect socket %d to %s, port %d (errno %d - %s)", 136 136 s, inet_ntoa(*addr), port, 137 sockerrno, strerror(sockerrno) );137 sockerrno, tr_strerror(sockerrno) ); 138 138 tr_netClose( s ); 139 139 s = -1; … … 177 177 sizeof( struct sockaddr_in ) ) ) 178 178 { 179 tr_err( "Couldn't bind port %d: %s", port, strerror(sockerrno) );179 tr_err( "Couldn't bind port %d: %s", port, tr_strerror(sockerrno) ); 180 180 tr_netClose( s ); 181 181 return -1; -
trunk/libtransmission/peer-msgs.c
r5045 r5065 1653 1653 if( what & ( EVBUFFER_EOF | EVBUFFER_ERROR ) ) 1654 1654 dbgmsg( vmsgs, "libevent got an error! what=%hd, errno=%d (%s)", 1655 what, errno, strerror(errno) );1655 what, errno, tr_strerror(errno) ); 1656 1656 fireError( vmsgs, TR_ERROR ); 1657 1657 } -
trunk/libtransmission/platform.c
r4404 r5065 41 41 42 42 #include <assert.h> 43 #include <errno.h>44 43 #include <stdio.h> 45 44 #include <stdlib.h> -
trunk/libtransmission/shared.c
r4597 r5065 117 117 } else { 118 118 tr_err( NATKEY "unable to open port %d to listen for incoming peer connections (errno is %d - %s)", 119 s->publicPort, errno, strerror(errno) );119 s->publicPort, errno, tr_strerror(errno) ); 120 120 s->bindPort = -1; 121 121 s->bindSocket = -1; -
trunk/libtransmission/trevent.c
r4789 r5065 12 12 13 13 #include <assert.h> 14 #include <errno.h>15 14 #include <stdlib.h> 16 15 #include <string.h> -
trunk/libtransmission/upnp.c
r4404 r5065 14 14 #include <errno.h> 15 15 #include <stdio.h> /* snprintf */ 16 #include <string.h> /* strerror */17 16 18 17 #include <miniupnp/miniwget.h> … … 90 89 devlist = upnpDiscover( 2000, NULL, NULL ); 91 90 if( devlist == NULL ) { 92 tr_err( KEY "upnpDiscover returned NULL (errno %d - %s)", errno, strerror(errno) );91 tr_err( KEY "upnpDiscover returned NULL (errno %d - %s)", errno, tr_strerror(errno) ); 93 92 } 94 93 errno = 0; … … 100 99 } else { 101 100 handle->state = TR_UPNP_ERR; 102 tr_err( KEY "UPNP_GetValidIGD failed. (errno %d - %s)", errno, strerror(errno) );101 tr_err( KEY "UPNP_GetValidIGD failed. (errno %d - %s)", errno, tr_strerror(errno) ); 103 102 tr_err( KEY "If your router supports UPnP, please make sure UPnP is enabled!" ); 104 103 } … … 155 154 handle->state = TR_UPNP_IDLE; 156 155 } else { 157 tr_err( KEY "Port forwarding failed with err %d (%d - %s)", err, errno, strerror(errno) );156 tr_err( KEY "Port forwarding failed with err %d (%d - %s)", err, errno, tr_strerror(errno) ); 158 157 tr_err( KEY "If your router supports UPnP, please make sure UPnP is enabled!" ); 159 158 handle->port = -1; -
trunk/libtransmission/utils.c
r5011 r5065 28 28 #include <stdio.h> 29 29 #include <stdlib.h> 30 #include <string.h> 30 #include <string.h> /* strerror */ 31 31 32 32 #include <sys/time.h> … … 361 361 if( stat( path, &sb ) ) 362 362 { 363 tr_err( "Couldn't get information for file \"%s\" %s", path, strerror(errno) );363 tr_err( "Couldn't get information for file \"%s\" %s", path, tr_strerror(errno) ); 364 364 return NULL; 365 365 } … … 375 375 if( !file ) 376 376 { 377 tr_err( "Couldn't open file \"%s\" %s", path, strerror(errno) );377 tr_err( "Couldn't open file \"%s\" %s", path, tr_strerror(errno) ); 378 378 return NULL; 379 379 } … … 388 388 if( fread( buf, sb.st_size, 1, file ) != 1 ) 389 389 { 390 tr_err( "Error reading \"%s\" %s", path, strerror(errno) );390 tr_err( "Error reading \"%s\" %s", path, tr_strerror(errno) ); 391 391 free( buf ); 392 392 fclose( file ); … … 441 441 if( tr_mkdir( path, permissions ) ) { 442 442 const int err = errno; 443 tr_err( "Couldn't create directory %s (%s)", path, strerror( err ) );443 tr_err( "Couldn't create directory %s (%s)", path, tr_strerror( err ) ); 444 444 tr_free( path ); 445 445 errno = err; … … 505 505 return TR_ERROR_IO_FILE_TOO_BIG; 506 506 default: 507 tr_dbg( "generic i/o errno from errno: %s", strerror( errno ) );507 tr_dbg( "generic i/o errno from errno: %s", tr_strerror( errno ) ); 508 508 return TR_ERROR_IO_OTHER; 509 509 } … … 596 596 if( p ) 597 597 free( p ); 598 } 599 600 const char* 601 tr_strerror( int i ) 602 { 603 const char * ret = strerror( i ); 604 if( ret == NULL ) 605 ret = "Unknown Error"; 606 return ret; 598 607 } 599 608 -
trunk/libtransmission/utils.h
r4734 r5065 119 119 char* tr_strndup( const char * str, int len ); 120 120 121 const char* tr_strerror( int ); 122 121 123 /*** 122 124 ****
Note: See TracChangeset
for help on using the changeset viewer.