Index: cdr/cdr_csv.c =================================================================== RCS file: /usr/cvsroot/asterisk/cdr/cdr_csv.c,v retrieving revision 1.13 diff -u -r1.13 cdr_csv.c --- cdr/cdr_csv.c 21 Jan 2005 07:06:24 -0000 1.13 +++ cdr/cdr_csv.c 30 Mar 2005 18:56:34 -0000 @@ -39,6 +39,10 @@ #include #include +#ifdef CDR_GUID +#include +#endif + /*---------------------------------------------------- The values are as follows: @@ -129,6 +133,17 @@ return append_string(buf, tmp, bufsize); } +#ifdef CDR_GUID + +static void append_guid(char *buf, uuid_t guid, size_t bufsize) +{ + char guidtext[37]; + uuid_unparse(guid, guidtext); + append_string(buf, guidtext, bufsize); +} + +#endif + static int build_csv_record(char *buf, size_t bufsize, struct ast_cdr *cdr) { @@ -173,6 +188,9 @@ #ifdef CSV_LOGUSERFIELD /* append the user field */ append_string(buf, cdr->userfield,bufsize); +#endif +#ifdef CDR_GUID + append_guid(buf, cdr->guid, bufsize); #endif /* If we hit the end of our buffer, log an error */ if (strlen(buf) < bufsize - 5) {