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 | 50bf385109f48196a4be34d3f4535e3b373cb9bf (patch) | |
tree | 9d4c60b762dbc4258648633ddfa18af2b3bdf4e2 /src | |
parent | 027417a45b1b5a991d9ac06a01d96a86c80832bc (diff) | |
download | libpam-freerdp2-50bf385109f48196a4be34d3f4535e3b373cb9bf.tar.gz libpam-freerdp2-50bf385109f48196a4be34d3f4535e3b373cb9bf.tar.bz2 libpam-freerdp2-50bf385109f48196a4be34d3f4535e3b373cb9bf.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; |