change around types for better c99 compliance, fixes windows srtp build and builds that do not default to 8 bit stuct alignment.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3797 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2006-12-22 19:02:10 +00:00
1 parent 47343dcb87
commit 8761a73997
3 files changed
+22 -19

No files matched your search

+3 -3
View File
@@ -684,7 +684,7 @@ srtp_stream_init(srtp_stream_ctx_t *srtp,
* estimate the packet index using the start of the replay window
* and the sequence number from the header
*/
delta = rdbx_estimate_index(&stream->rtp_rdbx, &est, ntohs(hdr->seq));
delta = rdbx_estimate_index(&stream->rtp_rdbx, &est, ntohs((uint16_t)hdr->seq));
status = rdbx_check(&stream->rtp_rdbx, delta);
if (status)
return status; /* we've been asked to reuse an index */
@@ -842,7 +842,7 @@ srtp_unprotect(srtp_ctx_t *ctx, void *srtp_hdr, int *pkt_octet_len) {
est = (xtd_seq_num_t) make64(0,ntohs(hdr->seq));
delta = low32(est);
#else
est = (xtd_seq_num_t) ntohs(hdr->seq);
est = (xtd_seq_num_t) ntohs((uint16_t)hdr->seq);
delta = (int)est;
#endif
} else {
@@ -856,7 +856,7 @@ srtp_unprotect(srtp_ctx_t *ctx, void *srtp_hdr, int *pkt_octet_len) {
} else {
/* estimate packet index from seq. num. in header */
delta = rdbx_estimate_index(&stream->rtp_rdbx, &est, ntohs(hdr->seq));
delta = rdbx_estimate_index(&stream->rtp_rdbx, &est, ntohs((uint16_t)hdr->seq));
/* check replay database */
status = rdbx_check(&stream->rtp_rdbx, delta);