Opened 11 years ago

Closed 11 years ago

#3806 closed Bug (fixed)

Logging error in net.c

Reported by: x190 Owned by: charles
Priority: Normal Milestone: 2.13
Component: libtransmission Version: 2.12
Severity: Normal Keywords: logging, tr_err, net.c
Cc:

Description

The following code consistently produces an incorrect port number in the tr_err message. net.c:342.

{

int tmperrno; tmperrno = sockerrno; if( ( tmperrno != ENETUNREACH && tmperrno != EHOSTUNREACH )

addr->type == TR_AF_INET )

tr_err( _( "Couldn't connect socket %d to %s, port %d (errno %d - %s)" ),

s, tr_ntop_non_ts( addr ), (int)port, tmperrno, tr_strerror( tmperrno ) );

tr_netClose( session, s ); s = -tmperrno;

}

Example:

PG2 entry and reason for the errno 61:

Sun Dec 5 2010 19:37:08.311 MST -Blck- local:60482 -> 153.19.108.10:34734 tcp4 'Transmission (167)'

Related tr_err entry:

2010-12-05 16:51:13 -0700 net.c:342 [Error] Transmission: Couldn't connect socket 90 to 153.19.108.10, port 44679 (errno 61 - Connection refused)

This is consistent behavior. Port 80 becomes 4979 (from memory) and others similar to the example above.

Change History (14)

comment:1 Changed 11 years ago by x190

  • Component changed from Transmission to libtransmission
  • Owner set to charles

comment:2 in reply to: ↑ description Changed 11 years ago by x190

Replying to x190:

The following code consistently produces an incorrect port number in the tr_err message. net.c:342.

{

int tmperrno; tmperrno = sockerrno; if( ( tmperrno != ENETUNREACH && tmperrno != EHOSTUNREACH )

addr->type == TR_AF_INET )

tr_err( _( "Couldn't connect socket %d to %s, port %d (errno %d - %s)" ),

s, tr_ntop_non_ts( addr ), (int)port, tmperrno, tr_strerror( tmperrno ) );

tr_netClose( session, s ); s = -tmperrno;

}

Example:

PG2 entry and reason for the errno 61:

Sun Dec 5 2010 16:51:13.535 MST -Blck- local:56369 -> 153.19.xxx.10:34734 tcp4 'Transmission (167)

Related tr_err entry:

2010-12-05 16:51:13 -0700 net.c:342 [Error] Transmission: Couldn't connect socket 90 to 153.19.xxx.10, port 44679 (errno 61 - Connection refused)

This is consistent behavior. Port 80 becomes 4979 (from memory) and others similar to the example above.

Edit: Edited to show correct PG2 entry.

Last edited 11 years ago by x190 (previous) (diff)

comment:3 Changed 11 years ago by x190

Last edited 11 years ago by x190 (previous) (diff)

comment:4 in reply to: ↑ description Changed 11 years ago by x190

Last edited 11 years ago by x190 (previous) (diff)

comment:5 in reply to: ↑ description Changed 11 years ago by x190

Last edited 11 years ago by x190 (previous) (diff)

comment:6 Changed 11 years ago by x190

  • Owner changed from charles to x190

comment:7 Changed 11 years ago by x190

  • Owner changed from x190 to Charles

comment:8 Changed 11 years ago by x190

Sorry about all the edits. I was trying to find a way to edit the original ticket . Guess that's not possible. Over to you Charles == charles. :sigh:

comment:9 Changed 11 years ago by x190

  • Owner changed from Charles to charles

comment:10 follow-up: Changed 11 years ago by charles

x190: when you marked this as being 2.12+ do you mean this behavior is new, and is not in 2.12?

comment:11 in reply to: ↑ 10 Changed 11 years ago by x190

Replying to charles:

x190: when you marked this as being 2.12+ do you mean this behavior is new, and is not in 2.12?

I was and am now running 2.12+ (11457), and haven't tried 2.12 release. Will test 2.12 release if you think that will help. Please advise.

Last edited 11 years ago by x190 (previous) (diff)

comment:12 Changed 11 years ago by charles

  • Version changed from 2.12+ to 2.12

No, that's not necessary.

I think 2.12 behaved the same and was going to remove the '+' from the Version field, but before I did that I wanted to confirm that you *weren't* implying it was new behavior.

comment:13 Changed 11 years ago by charles

  • Milestone changed from None Set to 2.13
  • Status changed from new to assigned

comment:14 Changed 11 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in r11494

Note: See TracTickets for help on using tickets.