aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-08-27 15:07:36 -0500
committerTed Gould <ted@gould.cx>2012-08-27 15:07:36 -0500
commit50bf385109f48196a4be34d3f4535e3b373cb9bf (patch)
tree9d4c60b762dbc4258648633ddfa18af2b3bdf4e2
parent027417a45b1b5a991d9ac06a01d96a86c80832bc (diff)
downloadlibpam-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
-rw-r--r--src/freerdp-auth-check.c9
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;