Skip to content

Commit

Permalink
Minor, update/reflow/add DBG() messages a bit
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Nilsson <[email protected]>
  • Loading branch information
troglobit committed May 22, 2018
1 parent 012eb24 commit 926b638
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ftpcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ static int open_data_connection(ctrl_t *ctrl)
return -1;
}

DBG("Connected successfully to client's previously requested address:PORT %s:%d", ctrl->data_address, ctrl->data_port);
DBG("Connected successfully to client's previously requested address:PORT %s:%d",
ctrl->data_address, ctrl->data_port);
return 0;
}

Expand Down Expand Up @@ -201,14 +202,16 @@ static int open_data_connection(ctrl_t *ctrl)
return -1;
}
inet_ntop(AF_INET, &(sin.sin_addr), client_ip, INET_ADDRSTRLEN);
DBG("Client PASV data connection from %s", client_ip);
DBG("Client PASV data connection from %s:%d", client_ip, ntohs(sin.sin_port));
}

return 0;
}

static void close_data_connection(ctrl_t *ctrl)
{
DBG("Closing data connection ...");

/* PASV server listening socket */
if (ctrl->data_listen_sd > 0) {
shutdown(ctrl->data_listen_sd, SHUT_RDWR);
Expand Down

0 comments on commit 926b638

Please sign in to comment.