diff options
author | Ted Gould <ted@gould.cx> | 2012-08-27 15:07:36 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-08-27 15:07:36 -0500 |
commit | d4ba1e134fcce95f8b7983fa9fba6d9d18f8f68b (patch) | |
tree | 9d4c60b762dbc4258648633ddfa18af2b3bdf4e2 /src | |
parent | 4262a0309076b1db2eb15adfbc04b62126e39cf1 (diff) | |
download | libpam-x2go-d4ba1e134fcce95f8b7983fa9fba6d9d18f8f68b.tar.gz libpam-x2go-d4ba1e134fcce95f8b7983fa9fba6d9d18f8f68b.tar.bz2 libpam-x2go-d4ba1e134fcce95f8b7983fa9fba6d9d18f8f68b.zip |
If we've got a colon for a port number split that out
Diffstat (limited to 'src')
-rw-r--r-- | src/freerdp-auth-check.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/freerdp-auth-check.c b/src/freerdp-auth-check.c index 83bab2f..d50833b 100644 --- a/src/freerdp-auth-check.c +++ b/src/freerdp-auth-check.c @@ -79,6 +79,15 @@ main (int argc, char * argv[]) instance->settings->password = password; instance->settings->ignore_certificate = true; + char * colonloc = strstr(argv[1], ":"); + if (colonloc != NULL) { + /* We've got a port to deal with */ + colonloc[0] = '\0'; + colonloc++; + + instance->settings->port = strtoul(colonloc, NULL, 10); + } + if (freerdp_connect(instance)) { freerdp_disconnect(instance); return 0; |