diff --git a/daemon/aux.h b/daemon/aux.h index ef9b142ef..842243a6d 100644 --- a/daemon/aux.h +++ b/daemon/aux.h @@ -627,5 +627,15 @@ INLINE void *__uid_slice_alloc0(unsigned int size, GQueue *q, unsigned int offse return ret; } +#define TRUNCATED " ... Output truncated. Increase Output Buffer ... \n" + +#define truncate_output(x) strcpy(x - strlen(TRUNCATED) - 1, TRUNCATED) + +#define ADJUSTLEN(printlen,outbufend,replybuffer) do { \ + replybuffer += (printlen>=outbufend-replybuffer)?outbufend-replybuffer:printlen; \ + if (replybuffer == outbufend) \ + truncate_output(replybuffer); \ + } while (0); + #endif diff --git a/daemon/call.h b/daemon/call.h index 576082062..bf23d2d16 100644 --- a/daemon/call.h +++ b/daemon/call.h @@ -21,15 +21,6 @@ #include "statistics.h" #define UNDEFINED ((unsigned int) -1) -#define TRUNCATED " ... Output truncated. Increase Output Buffer ... \n" - -#define truncate_output(x) strcpy(x - strlen(TRUNCATED) - 1, TRUNCATED) - -#define ADJUSTLEN(printlen,outbufend,replybuffer) do { \ - replybuffer += (printlen>=outbufend-replybuffer)?outbufend-replybuffer:printlen; \ - if (replybuffer == outbufend) \ - truncate_output(replybuffer); \ - } while (0); enum termination_reason { UNKNOWN=0, @@ -483,7 +474,6 @@ void add_total_calls_duration_in_interval(struct callmaster *cm, struct timeval void __payload_type_free(void *p); void __rtp_stats_update(GHashTable *dst, GHashTable *src); -const char *get_tag_type_text(enum tag_type t); const char *get_opmode_text(enum call_opmode); const struct rtp_payload_type *__rtp_stats_codec(struct call_media *m); diff --git a/daemon/cdr.h b/daemon/cdr.h index 6cb7f13f7..cc42ae3a9 100644 --- a/daemon/cdr.h +++ b/daemon/cdr.h @@ -8,8 +8,12 @@ #ifndef CDR_H_ #define CDR_H_ +#include "aux.h" + struct call; +enum tag_type; +const char *get_tag_type_text(enum tag_type t); void cdr_update_entry(struct call* c); #endif /* CDR_H_ */ diff --git a/daemon/cli.c b/daemon/cli.c index b95fbb2de..f4d88999a 100644 --- a/daemon/cli.c +++ b/daemon/cli.c @@ -18,6 +18,7 @@ #include "redis.h" #include "control_ng.h" #include "media_socket.h" +#include "cdr.h" #include "rtpengine_config.h"