]> git.sur5r.net Git - openocd/commitdiff
server: incorrectly display socket port number
authorSpencer Oliver <ntfreak@users.sourceforge.net>
Thu, 6 May 2010 21:51:20 +0000 (22:51 +0100)
committerSpencer Oliver <ntfreak@users.sourceforge.net>
Thu, 6 May 2010 21:51:20 +0000 (22:51 +0100)
c->sin.sin_port does not contain a valid port number so just use
service->port as this is always correct.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
src/server/server.c

index 7e57228b091155f084ba47dcfa0c20a93280e4c8..57c4016231e6d2313c6cb252daf4e241e42d3505 100644 (file)
@@ -78,7 +78,7 @@ static int add_connection(struct service *service, struct command_context *cmd_c
                                (char *)&flag,          /* the cast is historical cruft */
                                sizeof(int));           /* length of option value */
 
-               LOG_INFO("accepting '%s' connection from %i", service->name, c->sin.sin_port);
+               LOG_INFO("accepting '%s' connection from %i", service->name, service->port);
                if ((retval = service->new_connection(c)) != ERROR_OK)
                {
                        close_socket(c->fd);