From c0883294ef7a34233712beadcd258aad19478015 Mon Sep 17 00:00:00 2001 From: dcp1990 Date: Thu, 2 Jun 2005 02:50:18 +0000 Subject: [PATCH] Logging facilities for CID --- phoned/log.c | 5 +++++ phoned/modem.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/phoned/log.c b/phoned/log.c index dcd2023..78bc442 100644 --- a/phoned/log.c +++ b/phoned/log.c @@ -136,3 +136,8 @@ int lprintf(enum ltype logtype, const char* fmt, ...) free(ofmt); /* MUST do this */ return cnt; } +void cid_log(cid_t* c) +{ + lprintf(info, "Call! %02d%02d:%02d%02d:%s:%s", c->month, c->day, c->hour, c->minute, + c->name, c->number); +} diff --git a/phoned/modem.c b/phoned/modem.c index 00e009b..584cc83 100644 --- a/phoned/modem.c +++ b/phoned/modem.c @@ -1,7 +1,8 @@ /* * Copyright (c) 2005, Dan Ponte * - * modem.c - modem code + * modem.c - modem code for supra (Rockwell), might work on others... + * this will be pluggable in the future * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -133,6 +134,7 @@ void modem_hread(char* cbuf) if(doing_cid) { cid_t *rc; rc = parse_cid(buffer); + cid_log(rc); cid_notify(rc); memset(buffer, 0, sizeof(buffer)); doing_cid = 0;