aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/dundi-parser.c
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-23 04:53:12 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-23 04:53:12 +0000
commite074114c01987036f411dcf8ef9557eebad9d061 (patch)
treefb50f6ac73582bc88cd2d8f7b90948719dc81375 /pbx/dundi-parser.c
parentbd20fa0774b99b20cff58500f50d5fd02073b3f0 (diff)
Cleanup dundi-parser.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4053 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/dundi-parser.c')
-rwxr-xr-xpbx/dundi-parser.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index 45e186c78..99c74f88d 100755
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -22,9 +22,10 @@
#include <asterisk/dundi.h>
#include "dundi-parser.h"
#include <asterisk/dundi.h>
+
static void internaloutput(const char *str)
{
- printf(str);
+ fputs(str, stdout);
}
static void internalerror(const char *str)
@@ -91,6 +92,7 @@ int dundi_str_short_to_eid(dundi_eid *eid, char *s)
eid->eid[x] = eid_int[x];
return 0;
}
+
int dundi_eid_zero(dundi_eid *eid)
{
int x;
@@ -222,8 +224,7 @@ static void dump_byte(char *output, int maxlen, void *value, int len)
}
static char *proto2str(int proto, char *buf, int bufsiz)
-{
-
+{
switch(proto) {
case DUNDI_PROTO_NONE:
strncpy(buf, "None", bufsiz - 1);
@@ -464,14 +465,14 @@ void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int
}
snprintf(subclass2, (int)sizeof(subclass2), "%02x", fhi->cmdflags);
subclass = subclass2;
-snprintf(tmp, (int)sizeof(tmp),
-"%s-Frame Retry[%s] -- OSeqno: %3.3d ISeqno: %3.3d Type: %s (%s)\n",
- pref[rx],
- retries, fhi->oseqno, fhi->iseqno, class, fhi->cmdresp & 0x40 ? "Response" : "Command");
+ snprintf(tmp, (int)sizeof(tmp),
+ "%s-Frame Retry[%s] -- OSeqno: %3.3d ISeqno: %3.3d Type: %s (%s)\n",
+ pref[rx],
+ retries, fhi->oseqno, fhi->iseqno, class, fhi->cmdresp & 0x40 ? "Response" : "Command");
outputf(tmp);
-snprintf(tmp, (int)sizeof(tmp),
-"%s Flags: %s STrans: %5.5d DTrans: %5.5d [%s:%d]%s\n", (rx > 1) ? " " : "",
- subclass, ntohs(fhi->strans) & ~DUNDI_FLAG_RESERVED, ntohs(fhi->dtrans) & ~DUNDI_FLAG_RETRANS,
+ snprintf(tmp, (int)sizeof(tmp),
+ "%s Flags: %s STrans: %5.5d DTrans: %5.5d [%s:%d]%s\n", (rx > 1) ? " " : "",
+ subclass, ntohs(fhi->strans) & ~DUNDI_FLAG_RESERVED, ntohs(fhi->dtrans) & ~DUNDI_FLAG_RETRANS,
ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr), ntohs(sin->sin_port),
fhi->cmdresp & 0x80 ? " (Final)" : "");
outputf(tmp);