[sr-dev] git:5.5:a2043123: ctl: removed unused function safe_write()
Daniel-Constantin Mierla
miconda at gmail.com
Fri Nov 5 08:51:21 CET 2021
Module: kamailio
Branch: 5.5
Commit: a204312372bd09dcfb276e960892e14fbe2eceeb
URL: https://github.com/kamailio/kamailio/commit/a204312372bd09dcfb276e960892e14fbe2eceeb
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-11-05T08:42:26+01:00
ctl: removed unused function safe_write()
(cherry picked from commit cc0cbad3660423f679fed62c42fcffb4a402081f)
---
Modified: src/modules/ctl/fifo_server.c
---
Diff: https://github.com/kamailio/kamailio/commit/a204312372bd09dcfb276e960892e14fbe2eceeb.diff
Patch: https://github.com/kamailio/kamailio/commit/a204312372bd09dcfb276e960892e14fbe2eceeb.patch
---
diff --git a/src/modules/ctl/fifo_server.c b/src/modules/ctl/fifo_server.c
index b40b079a1d..50507dd03b 100644
--- a/src/modules/ctl/fifo_server.c
+++ b/src/modules/ctl/fifo_server.c
@@ -947,29 +947,6 @@ static void rpc_fault(rpc_ctx_t* ctx, int code, char* fmt, ...)
}
-static inline int safe_write(FILE* f, char* fmt, ...)
-{
- va_list ap;
-
- if (!*fmt) return 0;
- va_start(ap, fmt);
-
- retry:
- /* First line containing code and reason phrase */
- if (vfprintf(f, fmt, ap) <= 0) {
- ERR("fifo write error: %s\n", strerror(errno));
- if ((errno == EINTR) || (errno == EAGAIN) || (errno == EWOULDBLOCK)) {
- goto retry;
- }
- va_end(ap);
- return -1;
- }
- va_end(ap);
- return 0;
-}
-
-
-
inline static int build_iovec(rpc_ctx_t* ctx, struct iovec* v, int v_size)
{
struct text_chunk* p;
More information about the sr-dev
mailing list