*/
#include <stdio.h>
-#include <stdlib.h>
#include <jansson.h>
#include <trust_router/tr_dh.h>
{
int err = 0;
int conn = -1;
+ unsigned int use_port = 0;
- 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;
if (msg)
free(msg);
if (tid_req)
- free(tid_req);
+ tid_req_free(tid_req);
if (req_buf)
free(req_buf);
if (resp_buf)
return 0;
}
-
-
-
-