Index: /pjproject/trunk/pjnath/src/pjnath/stun_msg.c
===================================================================
--- /pjproject/trunk/pjnath/src/pjnath/stun_msg.c	(revision 1288)
+++ /pjproject/trunk/pjnath/src/pjnath/stun_msg.c	(revision 1289)
@@ -1657,7 +1657,7 @@
 
 	/* Check if FINGERPRINT attribute is present */
-	if (GETVAL16H(pdu, msg_len + 20) == PJ_STUN_ATTR_FINGERPRINT) {
-	    pj_uint16_t attr_len = GETVAL16H(pdu, msg_len + 22);
-	    pj_uint32_t fingerprint = GETVAL32H(pdu, msg_len + 24);
+	if (GETVAL16H(pdu, msg_len + 20 - 8) == PJ_STUN_ATTR_FINGERPRINT) {
+	    pj_uint16_t attr_len = GETVAL16H(pdu, msg_len + 20 - 8 + 2);
+	    pj_uint32_t fingerprint = GETVAL32H(pdu, msg_len + 20 - 8 + 4);
 	    pj_uint32_t crc;
 
@@ -1665,5 +1665,5 @@
 		return PJNATH_ESTUNINATTRLEN;
 
-	    crc = pj_crc32_calc(pdu, msg_len + 20);
+	    crc = pj_crc32_calc(pdu, msg_len + 20 - 8);
 	    crc ^= STUN_XOR_FINGERPRINT;
 
Index: /pjproject/trunk/pjnath/src/pjnath/stun_msg_dump.c
===================================================================
--- /pjproject/trunk/pjnath/src/pjnath/stun_msg_dump.c	(revision 1288)
+++ /pjproject/trunk/pjnath/src/pjnath/stun_msg_dump.c	(revision 1289)
@@ -97,4 +97,5 @@
 				       ", INVALID ADDRESS FAMILY!\n");
 	    }
+	    APPLY();
 	}
 	break;
@@ -118,4 +119,5 @@
 				   (pj_uint32_t)attr->value,
 				   (pj_uint32_t)attr->value);
+	    APPLY();
 	}
 	break;
@@ -134,4 +136,5 @@
 				   (int)attr->value.slen,
 				   attr->value.ptr);
+	    APPLY();
 	}
 	break;
@@ -147,4 +150,5 @@
 				   (int)attr->reason.slen,
 				   attr->reason.ptr);
+	    APPLY();
 	}
 	break;
@@ -192,9 +196,7 @@
     default:
 	len = pj_ansi_snprintf(p, end-p, "\n");
-
+	APPLY();
 	break;
     }
-
-    APPLY();
 
     return (p-buffer);
Index: /pjproject/trunk/pjnath/src/pjstun-srv-test/main.c
===================================================================
--- /pjproject/trunk/pjnath/src/pjstun-srv-test/main.c	(revision 1288)
+++ /pjproject/trunk/pjnath/src/pjstun-srv-test/main.c	(revision 1289)
@@ -133,5 +133,5 @@
 
     status = pj_stun_turn_usage_create(srv, PJ_SOCK_DGRAM, NULL,
-				       3478, &turn);
+				       3478, o.use_fingerprint, &turn);
     if (status != PJ_SUCCESS) {
 	pj_stun_perror(THIS_FILE, "Unable to create bind usage", status);
Index: /pjproject/trunk/pjnath/src/pjstun-srv-test/server.h
===================================================================
--- /pjproject/trunk/pjnath/src/pjstun-srv-test/server.h	(revision 1288)
+++ /pjproject/trunk/pjnath/src/pjstun-srv-test/server.h	(revision 1289)
@@ -123,4 +123,5 @@
 					       const pj_str_t *ip_addr,
 					       unsigned port,
+					       pj_bool_t use_fingerprint,
 					       pj_stun_usage **p_bu);
 
Index: /pjproject/trunk/pjnath/src/pjstun-srv-test/turn_usage.c
===================================================================
--- /pjproject/trunk/pjnath/src/pjstun-srv-test/turn_usage.c	(revision 1288)
+++ /pjproject/trunk/pjnath/src/pjstun-srv-test/turn_usage.c	(revision 1289)
@@ -80,4 +80,5 @@
     pj_hash_table_t	*client_htable;
     pj_stun_auth_cred	*cred;
+    pj_bool_t		 use_fingerprint;
 
     unsigned		 max_bw_kbps;
@@ -147,4 +148,5 @@
 					      const pj_str_t *ip_addr,
 					      unsigned port,
+					      pj_bool_t use_fingerprint,
 					      pj_stun_usage **p_bu)
 {
@@ -173,4 +175,5 @@
     tu->max_bw_kbps = 64;
     tu->max_lifetime = 10 * 60;
+    tu->use_fingerprint = use_fingerprint;
 
     status = pj_sockaddr_in_init(&local_addr, ip_addr, (pj_uint16_t)port);
@@ -200,5 +203,5 @@
     sess_cb.on_rx_request = &tu_sess_on_rx_request;
     status = pj_stun_session_create(&si->stun_cfg, "turns%p", &sess_cb, 
-				    PJ_FALSE, &tu->default_session);
+				    use_fingerprint, &tu->default_session);
     if (status != PJ_SUCCESS) {
 	pj_stun_usage_destroy(tu->usage);
@@ -638,5 +641,5 @@
     sess_cb.on_rx_indication = &client_sess_on_rx_msg;
     status = pj_stun_session_create(tu->cfg, client->obj_name, 
-				    &sess_cb, PJ_FALSE,
+				    &sess_cb, tu->use_fingerprint,
 				    &client->session);
     if (status != PJ_SUCCESS) {
