From: Margaret Wasserman Date: Mon, 17 Mar 2014 19:04:47 +0000 (-0400) Subject: If port passed in to tidc_open_connection() is 0, use the default port. X-Git-Tag: 1.3.1~44 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=commitdiff_plain;h=239510932f0472e551ca35fc07bf1d1b9a6f905c If port passed in to tidc_open_connection() is 0, use the default port. --- diff --git a/tid/tidc.c b/tid/tidc.c index 90ac58e..9590260 100644 --- a/tid/tidc.c +++ b/tid/tidc.c @@ -67,9 +67,15 @@ int tidc_open_connection (TIDC_INSTANCE *tidc, { int err = 0; int conn = -1; + unsigned int use_port = 0; - fprintf(stderr, "tidc_open_connection: Opening GSS connection to %s:%u.", server, port); - err = gsscon_connect(server, port, "trustidentity", &conn, gssctx); + if (0 == port) + use_port = TID_PORT; + else + use_port = port; + + fprintf(stderr, "tidc_open_connection: Opening GSS connection to %s:%u.", server, use_port); + err = gsscon_connect(server, use_port, "trustidentity", &conn, gssctx); if (!err) return conn;