[libss7-commits] rmudgett: branch 1.0 r305 - in /branches/1.0: isup.c ss7.c ss7_internal.h
SVN commits to the libss7 project
libss7-commits at lists.digium.com
Thu Jul 19 12:47:23 CDT 2012
Author: rmudgett
Date: Thu Jul 19 12:47:19 2012
New Revision: 305
URL: http://svnview.digium.com/svn/libss7?view=rev&rev=305
Log:
* Add printf attributes to ss7_message() and ss7_error().
* Fix a format string parameter mismatch.
Modified:
branches/1.0/isup.c
branches/1.0/ss7.c
branches/1.0/ss7_internal.h
Modified: branches/1.0/isup.c
URL: http://svnview.digium.com/svn/libss7/branches/1.0/isup.c?view=diff&rev=305&r1=304&r2=305
==============================================================================
--- branches/1.0/isup.c (original)
+++ branches/1.0/isup.c Thu Jul 19 12:47:19 2012
@@ -2502,7 +2502,7 @@
ss7_message(ss7, "\t\tCIC: %d\n", cic);
ss7_dump_buf(ss7, 2, buf, 2);
- ss7_message(ss7, "\t\tMessage Type: %s\n", message2str(mh->type), mh->type & 0xff);
+ ss7_message(ss7, "\t\tMessage Type: %s(0x%02x)\n", message2str(mh->type), mh->type & 0xff);
ss7_dump_buf(ss7, 2, &buf[2], 1);
/* Find us in the message list */
Modified: branches/1.0/ss7.c
URL: http://svnview.digium.com/svn/libss7/branches/1.0/ss7.c?view=diff&rev=305&r1=304&r2=305
==============================================================================
--- branches/1.0/ss7.c (original)
+++ branches/1.0/ss7.c Thu Jul 19 12:47:19 2012
@@ -55,7 +55,7 @@
__ss7_error = func;
}
-void ss7_message(struct ss7 *ss7, char *fmt, ...)
+void ss7_message(struct ss7 *ss7, const char *fmt, ...)
{
char tmp[1024];
va_list ap;
@@ -69,7 +69,7 @@
fputs(tmp, stdout);
}
-void ss7_error(struct ss7 *ss7, char *fmt, ...)
+void ss7_error(struct ss7 *ss7, const char *fmt, ...)
{
char tmp[1024];
va_list ap;
Modified: branches/1.0/ss7_internal.h
URL: http://svnview.digium.com/svn/libss7/branches/1.0/ss7_internal.h?view=diff&rev=305&r1=304&r2=305
==============================================================================
--- branches/1.0/ss7_internal.h (original)
+++ branches/1.0/ss7_internal.h Thu Jul 19 12:47:19 2012
@@ -119,9 +119,8 @@
void ss7_msg_userpart_len(struct ss7_msg *m, int len);
-void ss7_message(struct ss7 *ss7, char *fmt, ...);
-
-void ss7_error(struct ss7 *ss7, char *fmt, ...);
+void ss7_message(struct ss7 *ss7, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
+void ss7_error(struct ss7 *ss7, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
void ss7_dump_buf(struct ss7 *ss7, int tabs, unsigned char *buf, int len);
More information about the libss7-commits
mailing list