diff options
| author | 2025-02-17 20:54:36 +0100 | |
|---|---|---|
| committer | 2025-02-17 20:54:36 +0100 | |
| commit | 7eb2556f26baf8ff79fcb7388712d8b714efc4f6 (patch) | |
| tree | 0d11017b6431c514bd6afd16138a06851cd2f09e /xs_curl.h | |
| parent | Merge tag '2.72' into curl-smtp (diff) | |
| parent | Merge pull request 'doc/snac8: elaborate regex blocking' (#305) from Menelmac... (diff) | |
| download | penes-snac2-7eb2556f26baf8ff79fcb7388712d8b714efc4f6.tar.gz penes-snac2-7eb2556f26baf8ff79fcb7388712d8b714efc4f6.tar.xz penes-snac2-7eb2556f26baf8ff79fcb7388712d8b714efc4f6.zip | |
Merge remote-tracking branch 'upstream/master' into curl-smtp
Diffstat (limited to 'xs_curl.h')
| -rw-r--r-- | xs_curl.h | 11 |
1 files changed, 11 insertions, 0 deletions
| @@ -13,6 +13,8 @@ int xs_smtp_request(const char *url, const char *user, const char *pass, | |||
| 13 | const char *from, const char *to, const xs_str *body, | 13 | const char *from, const char *to, const xs_str *body, |
| 14 | int use_ssl); | 14 | int use_ssl); |
| 15 | 15 | ||
| 16 | const char *xs_curl_strerr(int errnum); | ||
| 17 | |||
| 16 | #ifdef XS_IMPLEMENTATION | 18 | #ifdef XS_IMPLEMENTATION |
| 17 | 19 | ||
| 18 | #include <curl/curl.h> | 20 | #include <curl/curl.h> |
| @@ -240,6 +242,15 @@ int xs_smtp_request(const char *url, const char *user, const char *pass, | |||
| 240 | return (int)res; | 242 | return (int)res; |
| 241 | } | 243 | } |
| 242 | 244 | ||
| 245 | |||
| 246 | const char *xs_curl_strerr(int errnum) | ||
| 247 | { | ||
| 248 | CURLcode cc = errnum < 0 ? -errnum : errnum; | ||
| 249 | |||
| 250 | return curl_easy_strerror(cc); | ||
| 251 | } | ||
| 252 | |||
| 253 | |||
| 243 | #endif /* XS_IMPLEMENTATION */ | 254 | #endif /* XS_IMPLEMENTATION */ |
| 244 | 255 | ||
| 245 | #endif /* _XS_CURL_H */ | 256 | #endif /* _XS_CURL_H */ |