[27304] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Make krb5_trace_info a typedef

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Tue Nov 27 18:02:40 2012

Date: Tue, 27 Nov 2012 18:02:26 -0500
From: Benjamin Kaduk <kaduk@mit.edu>
Message-Id: <201211272302.qARN2Q2G023167@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/6a019d5cff9aecb88591accf03ac737c6f910c69
commit 6a019d5cff9aecb88591accf03ac737c6f910c69
Author: Ben Kaduk <kaduk@mit.edu>
Date:   Mon Nov 19 16:36:56 2012 -0500

    Make krb5_trace_info a typedef
    
    Our doxygen-to-sphinx documentation bridge only processes typedefs
    and not structure definitions, since we almost universally use
    typedefs for our data structures.  krb5_trace_info is the sole
    exception, so bring it into the fold.
    
    While here, flesh out the comment a bit more.
    
    ticket: 7447
    tags: pullup
    target_version: 1.11

 src/include/krb5/krb5.hin |   16 +++++++++++-----
 src/lib/krb5/os/trace.c   |    4 ++--
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin
index 7e1ce5f..a9e887e 100644
--- a/src/include/krb5/krb5.hin
+++ b/src/include/krb5/krb5.hin
@@ -7922,14 +7922,20 @@ krb5_pac_sign(krb5_context context, krb5_pac pac, krb5_timestamp authtime,
 krb5_error_code KRB5_CALLCONV
 krb5_allow_weak_crypto(krb5_context context, krb5_boolean enable);
 
-/* This structure may be extended to contain more fields in the future. */
-struct krb5_trace_info {
+/**
+ * A wrapper for passing information to a @c krb5_trace_callback.
+ *
+ * Currently, it only contains the formatted message as determined
+ * the the format string and arguments of the tracing macro, but it
+ * may be extended to contain more fields in the future.
+ */
+typedef struct _krb5_trace_info {
     const char *message;
-};
+} krb5_trace_info;
 
 typedef void
 (KRB5_CALLCONV *krb5_trace_callback)(krb5_context context,
-                                     const struct krb5_trace_info *info,
+                                     const krb5_trace_info *info,
                                      void *cb_data);
 
 /**
@@ -7941,7 +7947,7 @@ typedef void
  *
  * Specify a callback for trace events occurring in krb5 operations performed
  * within @a context.  @a fn will be invoked with @a context as the first
- * argument, @a cb_data as the last argument, and a pointer to a struct
+ * argument, @a cb_data as the last argument, and a pointer to a
  * krb5_trace_info as the second argument.  If the trace callback is reset via
  * this function or @a context is destroyed, @a fn will be invoked with a NULL
  * second argument so it can clean up @a cb_data.  Supply a NULL value for @a
diff --git a/src/lib/krb5/os/trace.c b/src/lib/krb5/os/trace.c
index 355b143..8f9ba04 100644
--- a/src/lib/krb5/os/trace.c
+++ b/src/lib/krb5/os/trace.c
@@ -342,7 +342,7 @@ void
 krb5int_trace(krb5_context context, const char *fmt, ...)
 {
     va_list ap;
-    struct krb5_trace_info info;
+    krb5_trace_info info;
     char *str = NULL, *msg = NULL;
     krb5_int32 sec, usec;
 
@@ -378,7 +378,7 @@ krb5_set_trace_callback(krb5_context context, krb5_trace_callback fn,
 }
 
 static void KRB5_CALLCONV
-file_trace_cb(krb5_context context, const struct krb5_trace_info *info, void *data)
+file_trace_cb(krb5_context context, const krb5_trace_info *info, void *data)
 {
     int *fd = data;
 
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post