aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/printf_hook.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-11-20 12:06:40 +0000
committerMartin Willi <martin@strongswan.org>2007-11-20 12:06:40 +0000
commitee61471113c2eac23324c5e8a4b5843ca0679e09 (patch)
tree7a5dd0afac8e9b70d596f544bdc896bdb9757b2f /src/libstrongswan/printf_hook.c
parent7b36b734a4db879802c48b640db176d03add01e6 (diff)
downloadstrongswan-ee61471113c2eac23324c5e8a4b5843ca0679e09.tar.bz2
strongswan-ee61471113c2eac23324c5e8a4b5843ca0679e09.tar.xz
implemented RFC4478 (repeated authentication)
changed %V printf handler to take a time delta, %#V now takes two arguments
Diffstat (limited to 'src/libstrongswan/printf_hook.c')
-rw-r--r--src/libstrongswan/printf_hook.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libstrongswan/printf_hook.c b/src/libstrongswan/printf_hook.c
index 0407e8c82..baf339640 100644
--- a/src/libstrongswan/printf_hook.c
+++ b/src/libstrongswan/printf_hook.c
@@ -116,3 +116,26 @@ int arginfo_ptr_alt_ptr_int(const struct printf_info *info, size_t n, int *argty
}
return 1;
}
+
+/**
+ * special arginfo handler respecting alt flag
+ */
+int arginfo_ptr_alt_ptr_ptr(const struct printf_info *info, size_t n, int *argtypes)
+{
+ if (info->alt)
+ {
+ if (n > 1)
+ {
+ argtypes[0] = PA_POINTER;
+ argtypes[1] = PA_POINTER;
+ }
+ return 2;
+ }
+
+ if (n > 0)
+ {
+ argtypes[0] = PA_POINTER;
+ }
+ return 1;
+}
+