way back in July, in r.75706, a fix was made ot the strftime usages, which was good, but in this case, the check for a nil time was accidentally removed, and now it is restored, to keep timevals like '1969-12-31 17:00:00' from showing up in the cdrs. No idea what databases will do with this. No bugs filed as yet, but it felt like a bug.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.1
Steve Murphy 18 years ago
parent af7e1964f2
commit dafa73bade

@ -201,12 +201,14 @@ static void cdr_get_tv(struct timeval tv, const char *fmt, char *buf, int bufsiz
if (fmt == NULL) { /* raw mode */ if (fmt == NULL) { /* raw mode */
snprintf(buf, bufsize, "%ld.%06ld", (long)tv.tv_sec, (long)tv.tv_usec); snprintf(buf, bufsize, "%ld.%06ld", (long)tv.tv_sec, (long)tv.tv_usec);
} else { } else {
if (tv.tv_sec) {
struct ast_tm tm; struct ast_tm tm;
ast_localtime(&tv, &tm, NULL); ast_localtime(&tv, &tm, NULL);
ast_strftime(buf, bufsize, fmt, &tm); ast_strftime(buf, bufsize, fmt, &tm);
} }
} }
}
/*! CDR channel variable retrieval */ /*! CDR channel variable retrieval */
void ast_cdr_getvar(struct ast_cdr *cdr, const char *name, char **ret, char *workspace, int workspacelen, int recur, int raw) void ast_cdr_getvar(struct ast_cdr *cdr, const char *name, char **ret, char *workspace, int workspacelen, int recur, int raw)

Loading…
Cancel
Save