[asterisk-commits] branch junky/iax2_sha1 r10603 -
/team/junky/iax2_sha1/channels/iax2-parser.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Feb 20 19:05:33 MST 2006
Author: junky
Date: Mon Feb 20 20:05:32 2006
New Revision: 10603
URL: http://svn.digium.com/view/asterisk?rev=10603&view=rev
Log:
added the dump_bin in the parser
Modified:
team/junky/iax2_sha1/channels/iax2-parser.c
Modified: team/junky/iax2_sha1/channels/iax2-parser.c
URL: http://svn.digium.com/view/asterisk/team/junky/iax2_sha1/channels/iax2-parser.c?rev=10603&r1=10602&r2=10603&view=diff
==============================================================================
--- team/junky/iax2_sha1/channels/iax2-parser.c (original)
+++ team/junky/iax2_sha1/channels/iax2-parser.c Mon Feb 20 20:05:32 2006
@@ -80,6 +80,21 @@
strncpy(output, value, maxlen);
output[maxlen] = '\0';
}
+
+static void dump_bin(char *output, int maxlen, void *value, int len)
+{
+ ast_log(LOG_WARNING, "value=%s\n", value);
+ int x;
+ maxlen--;
+ if (len > (maxlen >> 1))
+ len = maxlen >> 1;
+ for (x=0;x<len;x++)
+ sprintf(output + (x << 1), "%02x", ((unsigned char *)value)[x]);
+ output[len << 1] = '\0';
+ ast_log(LOG_WARNING, "output=%s\n",output);
+}
+
+
static void dump_prefs(char *output, int maxlen, void *value, int len)
{
More information about the asterisk-commits
mailing list