[svn-commits] rizzo: branch rizzo/astobj2 r45889 -
/team/rizzo/astobj2/main/http.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Sun Oct 22 11:25:14 MST 2006
Author: rizzo
Date: Sun Oct 22 13:25:13 2006
New Revision: 45889
URL: http://svn.digium.com/view/asterisk?rev=45889&view=rev
Log:
fix types of the cookie_io handlers to remove warnings.
Modified:
team/rizzo/astobj2/main/http.c
Modified: team/rizzo/astobj2/main/http.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/main/http.c?rev=45889&r1=45888&r2=45889&view=diff
==============================================================================
--- team/rizzo/astobj2/main/http.c (original)
+++ team/rizzo/astobj2/main/http.c Sun Oct 22 13:25:13 2006
@@ -428,30 +428,36 @@
}
#ifdef DO_SSL
+#if defined(HAVE_FUNOPEN)
+#define HOOK_T int
+#define LEN_T int
+#else
+#define HOOK_T ssize_t
+#define LEN_T size_t
+#endif
/*!
* replacement read/write functions for SSL support.
* We use wrappers rather than SSL_read/SSL_write directly so
* we can put in some debugging.
*/
-static int ssl_read(void *cookie, char *buf, int len)
-{
- int i;
- i = SSL_read(cookie, buf, len-1);
+static HOOK_T ssl_read(void *cookie, char *buf, LEN_T len)
+{
+ int i = SSL_read(cookie, buf, len-1);
#if 0
if (i >= 0)
buf[i] = '\0';
- ast_verbose("ssl read size %d returns %d <%s>\n", len, i, buf);
+ ast_verbose("ssl read size %d returns %d <%s>\n", (int)len, i, buf);
#endif
return i;
}
-static int ssl_write(void *cookie, const char *buf, int len)
+static HOOK_T ssl_write(void *cookie, const char *buf, LEN_T len)
{
#if 0
char *s = alloca(len+1);
strncpy(s, buf, len);
s[len] = '\0';
- ast_verbose("ssl write size %d <%s>\n", len, s);
+ ast_verbose("ssl write size %d <%s>\n", (int)len, s);
#endif
return SSL_write(cookie, buf, len);
}
More information about the svn-commits
mailing list