summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1f8f016)
raw | patch | inline | side by side (parent: 1f8f016)
author | Jim Radford <radford@galvanix.com> | |
Thu, 8 Aug 2013 16:31:46 +0000 (09:31 -0700) | ||
committer | Jim Radford <radford@galvanix.com> | |
Thu, 8 Aug 2013 16:39:25 +0000 (09:39 -0700) |
src/curl_json.c | patch | blob | history |
diff --git a/src/curl_json.c b/src/curl_json.c
index de66862c7cd415916df9182d43ad77387efd516a..253ca27d9fda5ffafdfdd9f059b600b7b3be2b10 100644 (file)
--- a/src/curl_json.c
+++ b/src/curl_json.c
static int cj_sock_perform (cj_t *db) /* {{{ */
{
+ char errbuf[1024];
struct sockaddr_un sa_unix = {};
sa_unix.sun_family = AF_UNIX;
sstrncpy (sa_unix.sun_path, db->sock, sizeof (sa_unix.sun_path));
if (connect (fd, (struct sockaddr *)&sa_unix, sizeof(sa_unix)) < 0)
{
ERROR ("curl_json plugin: connect(%s) failed: %s",
- (db->sock != NULL) ? db->sock : "<null>", strerror(errno));
+ (db->sock != NULL) ? db->sock : "<null>",
+ sstrerror(errno, errbuf, sizeof (errbuf)));
close (fd);
return (-1);
}
red = read (fd, buffer, sizeof(buffer));
if (red < 0) {
ERROR ("curl_json plugin: read(%s) failed: %s",
- (db->sock != NULL) ? db->sock : "<null>", strerror(errno));
+ (db->sock != NULL) ? db->sock : "<null>",
+ sstrerror(errno, errbuf, sizeof (errbuf)));
close (fd);
return (-1);
}