- peer=trps_get_peer_by_gssname(trps, peer_gssname); /* get the peer record */
- tmp = tr_name_strdup(peer_gssname); /* get the name as a null-terminated string */
- if (peer==NULL)
- tr_err("tr_trps_process_mq: incoming connection from unknown peer (%s) reported.", tmp);
- else {
- trp_peer_set_incoming_status(peer, PEER_CONNECTED);
- tr_notice("tr_trps_process_mq: incoming connection from %s established.", tmp);
+ if (NULL == peer_gssname) {
+ /* This should not happen, we should not be able to establish a connection if we do not
+ * know their GSS name */
+ tr_err("tr_trps_process_mq: incoming connection from unknown GSS name reported.");
+ } else {
+ peer = trps_get_peer_by_gssname(trps, peer_gssname); /* get the peer record */
+ tmp = tr_name_strdup(peer_gssname); /* get the name as a null-terminated string */
+ if (peer == NULL)
+ tr_err("tr_trps_process_mq: incoming connection from unknown peer (%s) reported.", tmp);
+ else {
+ trp_peer_set_incoming_status(peer, PEER_CONNECTED);
+ tr_info("tr_trps_process_mq: incoming connection from %s established.", tmp);
+ }
+ free(tmp);