[Asterisk-cvs] asterisk/pbx dundi-parser.c,1.1,1.2

citats at lists.digium.com citats at lists.digium.com
Sat Oct 23 00:49:12 CDT 2004


Update of /usr/cvsroot/asterisk/pbx
In directory mongoose.digium.com:/home/citats/cvs/asterisk/pbx

Modified Files:
	dundi-parser.c 
Log Message:
Cleanup dundi-parser.c

Index: dundi-parser.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/dundi-parser.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dundi-parser.c	18 Oct 2004 21:45:13 -0000	1.1
+++ dundi-parser.c	23 Oct 2004 04:53:12 -0000	1.2
@@ -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 @@
 		eid->eid[x] = eid_int[x];
 	return 0;
 }
+
 int dundi_eid_zero(dundi_eid *eid)
 {
 	int x;
@@ -222,8 +224,7 @@
 }
 
 static char *proto2str(int proto, char *buf, int bufsiz)
-{
-	
+{	
 	switch(proto) {
 	case DUNDI_PROTO_NONE:
 		strncpy(buf, "None", bufsiz - 1);
@@ -464,14 +465,14 @@
 	}
 	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);




More information about the svn-commits mailing list