Logging facilities for CID
This commit is contained in:
parent
4a98db21cd
commit
c0883294ef
2 changed files with 8 additions and 1 deletions
|
@ -136,3 +136,8 @@ int lprintf(enum ltype logtype, const char* fmt, ...)
|
||||||
free(ofmt); /* MUST do this */
|
free(ofmt); /* MUST do this */
|
||||||
return cnt;
|
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);
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, Dan Ponte
|
* 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
@ -133,6 +134,7 @@ void modem_hread(char* cbuf)
|
||||||
if(doing_cid) {
|
if(doing_cid) {
|
||||||
cid_t *rc;
|
cid_t *rc;
|
||||||
rc = parse_cid(buffer);
|
rc = parse_cid(buffer);
|
||||||
|
cid_log(rc);
|
||||||
cid_notify(rc);
|
cid_notify(rc);
|
||||||
memset(buffer, 0, sizeof(buffer));
|
memset(buffer, 0, sizeof(buffer));
|
||||||
doing_cid = 0;
|
doing_cid = 0;
|
||||||
|
|
Loading…
Reference in a new issue