aboutsummaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-24 20:57:05 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-24 20:57:05 +0400
commit62108fe767966d44e43f4b23094f220dd0d6bf27 (patch)
treeb87a61491189f85f57f387ee99e7844f750a92c1 /src/map.c
parent4536c2547b508cfa575218f6ebc147bf471ba465 (diff)
downloadrspamd-62108fe767966d44e43f4b23094f220dd0d6bf27.tar.gz
rspamd-62108fe767966d44e43f4b23094f220dd0d6bf27.zip
* Use rspamd_snprintf instead of libc one
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map.c b/src/map.c
index bb3d04937..d6e57715a 100644
--- a/src/map.c
+++ b/src/map.c
@@ -82,12 +82,12 @@ write_http_request (struct rspamd_map *map, struct http_map_data *data, int sock
char outbuf[BUFSIZ];
int r;
- r = snprintf (outbuf, sizeof (outbuf), "GET %s%s HTTP/1.1" CRLF "Connection: close" CRLF "Host: %s" CRLF, (*data->path == '/') ? "" : "/", data->path, data->host);
+ r = rspamd_snprintf (outbuf, sizeof (outbuf), "GET %s%s HTTP/1.1" CRLF "Connection: close" CRLF "Host: %s" CRLF, (*data->path == '/') ? "" : "/", data->path, data->host);
if (data->last_checked != 0) {
- r += snprintf (outbuf + r, sizeof (outbuf) - r, "If-Modified-Since: %s" CRLF, asctime (gmtime (&data->last_checked)));
+ r += rspamd_snprintf (outbuf + r, sizeof (outbuf) - r, "If-Modified-Since: %s" CRLF, asctime (gmtime (&data->last_checked)));
}
- r += snprintf (outbuf + r, sizeof (outbuf) - r, CRLF);
+ r += rspamd_snprintf (outbuf + r, sizeof (outbuf) - r, CRLF);
if (write (sock, outbuf, r) == -1) {
msg_err ("failed to write request: %d, %s", errno, strerror (errno));
@@ -239,7 +239,7 @@ read_http_chunked (u_char * buf, size_t len, struct rspamd_map *map, struct http
return TRUE;
}
else {
- msg_info ("invalid chunked reply: %*s", len, buf);
+ msg_info ("invalid chunked reply: %*s", (int)len, buf);
return FALSE;
}
}