Changeset 1038 for pjproject/trunk/pjlib-util/src/pjlib-util/stun_msg.c
- Timestamp:
- Mar 3, 2007 7:35:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/stun_msg.c
r1037 r1038 1842 1842 1843 1843 /* 1844 static char *print_binary(const pj_uint8_t *data, unsigned data_len) 1845 { 1846 static char static_buffer[1024]; 1847 char *buffer = static_buffer; 1848 unsigned length=sizeof(static_buffer), i; 1849 1850 if (length < data_len * 2 + 8) 1851 return ""; 1852 1853 pj_ansi_sprintf(buffer, ", data="); 1854 buffer += 7; 1855 1856 for (i=0; i<data_len; ++i) { 1857 pj_ansi_sprintf(buffer, "%02x", (*data) & 0xFF); 1858 buffer += 2; 1859 data++; 1860 } 1861 1862 pj_ansi_sprintf(buffer, "\n"); 1863 buffer++; 1864 1865 return static_buffer; 1866 } 1867 */ 1868 1869 /* 1844 1870 * Print the message structure to a buffer. 1845 1871 */ … … 2002 2028 2003 2029 /* Calculate HMAC-SHA1 digest */ 2004 pj_hmac_sha1((pj_uint8_t*) buf, buf-start,2030 pj_hmac_sha1((pj_uint8_t*)start, buf-start, 2005 2031 (pj_uint8_t*)key.ptr, key.slen, 2006 2032 amsgint->hmac);
Note: See TracChangeset
for help on using the changeset viewer.