1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-09-28 19:05:55 +08:00
This commit is contained in:
stefanocasazza 2017-12-21 17:14:51 +01:00
parent a0fd0ec618
commit 0778c04fab
2 changed files with 5 additions and 2 deletions

View File

@ -258,7 +258,9 @@ bool USSHSocket::connectServer(const UString& server, unsigned int iServPort, in
{
USocket::iRemotePort = iServPort;
#endif
const char* srv = server.c_str();
U_INTERNAL_ASSERT(server.isNullTerminated())
const char* srv = server.data();
(void) U_SYSCALL(ssh_options_set, "%p,%d,%S", session, SSH_OPTIONS_HOST, srv);
(void) U_SYSCALL(ssh_options_set, "%p,%d,%p", session, SSH_OPTIONS_PORT, &iServPort);

View File

@ -303,7 +303,8 @@ check_for_netcat() {
if [ $? -eq 0 ]; then
NC_TEST=`netcat -h 2>&1 | head -n 1`
if [ "$NC_TEST" = "[v1.10]" ]; then
if [ "$NC_TEST" = "[v1.10]" ] || \
[ "$NC_TEST" = "[v1.10-41]" ]; then
NCAT=netcat
elif [ "`echo $NC_TEST | cut -d' ' -f1`" = "GNU" ]; then
NCAT=netcat