Mercurial > hg > freeDiameter
comparison freeDiameter/sctps.c @ 228:dcb58243e91f
More cleanups
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Tue, 02 Mar 2010 14:58:19 +0900 |
parents | 80a7e65167c4 |
children | 5df55136361b |
comparison
equal
deleted
inserted
replaced
227:80a7e65167c4 | 228:dcb58243e91f |
---|---|
75 CHECK_PARAMS_DO(conn && (conn->cc_socket > 0), goto out); | 75 CHECK_PARAMS_DO(conn && (conn->cc_socket > 0), goto out); |
76 | 76 |
77 /* Set the thread name */ | 77 /* Set the thread name */ |
78 { | 78 { |
79 char buf[48]; | 79 char buf[48]; |
80 snprintf(buf, sizeof(buf), "Demuxer (%d)", conn->cc_socket); | 80 snprintf(buf, sizeof(buf), "Demuxer (%d:%s)", conn->cc_socket, conn->cc_remid); |
81 fd_log_threadname ( buf ); | 81 fd_log_threadname ( buf ); |
82 } | 82 } |
83 | 83 |
84 ASSERT( conn->cc_proto == IPPROTO_SCTP ); | 84 ASSERT( conn->cc_proto == IPPROTO_SCTP ); |
85 ASSERT( Target_Queue(conn) ); | 85 ASSERT( Target_Queue(conn) ); |
105 | 105 |
106 case FDEVP_CNX_ERROR: | 106 case FDEVP_CNX_ERROR: |
107 fd_cnx_markerror(conn); | 107 fd_cnx_markerror(conn); |
108 goto out; | 108 goto out; |
109 | 109 |
110 case FDEVP_CNX_SHUTDOWN: | |
111 /* Just ignore the notification for now, we will get another error later anyway */ | |
112 continue; | |
113 | |
110 default: | 114 default: |
111 goto fatal; | 115 goto fatal; |
112 } | 116 } |
113 | 117 |
114 } while (conn->cc_loop); | 118 } while (conn->cc_loop); |
140 ASSERT( Target_Queue(cnx) ); | 144 ASSERT( Target_Queue(cnx) ); |
141 | 145 |
142 /* Set the thread name */ | 146 /* Set the thread name */ |
143 { | 147 { |
144 char buf[48]; | 148 char buf[48]; |
145 snprintf(buf, sizeof(buf), "Decipher (%hu@%d)", ctx->strid, cnx->cc_socket); | 149 snprintf(buf, sizeof(buf), "Decipher (%hu@%d:%s)", ctx->strid, cnx->cc_socket, cnx->cc_remid); |
146 fd_log_threadname ( buf ); | 150 fd_log_threadname ( buf ); |
147 } | 151 } |
148 | 152 |
149 /* The next function loops while there is no error */ | 153 /* The next function loops while there is no error */ |
150 CHECK_FCT_DO(fd_tls_rcvthr_core(cnx, ctx->strid ? ctx->session : cnx->cc_tls_para.session), /* continue */); | 154 CHECK_FCT_DO(fd_tls_rcvthr_core(cnx, ctx->strid ? ctx->session : cnx->cc_tls_para.session), /* continue */); |
339 sr = (struct sr_data *)li; | 343 sr = (struct sr_data *)li; |
340 | 344 |
341 /* Check the data is the same */ | 345 /* Check the data is the same */ |
342 if ((data.size != sr->data.size) || memcmp(data.data, sr->data.data, data.size)) { | 346 if ((data.size != sr->data.size) || memcmp(data.data, sr->data.data, data.size)) { |
343 TRACE_DEBUG(INFO, "GnuTLS tried to store a session with same key and different data!"); | 347 TRACE_DEBUG(INFO, "GnuTLS tried to store a session with same key and different data!"); |
348 TRACE_DEBUG_BUFFER(INFO, "Session store [key ", key.data, key.size, "]"); | |
349 TRACE_DEBUG_BUFFER(INFO, " -- old data [", sr->data.data, sr->data.size, "]"); | |
350 TRACE_DEBUG_BUFFER(INFO, " -- new data [", data.data, data.size, "]"); | |
351 | |
344 ret = -1; | 352 ret = -1; |
345 } else { | 353 } else { |
346 TRACE_DEBUG(GNUTLS_DBG_LEVEL, "GnuTLS tried to store a session with same key and same data, skipped."); | 354 TRACE_DEBUG(GNUTLS_DBG_LEVEL, "GnuTLS tried to store a session with same key and same data, skipped."); |
347 } | 355 } |
348 goto out; | 356 goto out; |