projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make chan_lcr compile with latest Asterisk.
[lcr.git]
/
trace.c
diff --git
a/trace.c
b/trace.c
index
b8dc001
..
fdfa045
100644
(file)
--- a/
trace.c
+++ b/
trace.c
@@
-92,7
+92,9
@@
static char *print_trace(int detail, int port, char *interface, char *caller, ch
char buffer[256];
time_t ti = trace.sec;
struct tm *tm;
char buffer[256];
time_t ti = trace.sec;
struct tm *tm;
+#ifdef WITH_MISDN
struct mISDNport *mISDNport;
struct mISDNport *mISDNport;
+#endif
int i;
trace_string[0] = '\0'; // always clear string
int i;
trace_string[0] = '\0'; // always clear string
@@
-115,6
+117,7
@@
static char *print_trace(int detail, int port, char *interface, char *caller, ch
/* head */
if (detail >= 3) {
SCAT(trace_string, "------------------------------------------------------------------------------\n");
/* head */
if (detail >= 3) {
SCAT(trace_string, "------------------------------------------------------------------------------\n");
+#ifdef WITH_MISDN
/* "Port: 1 (BRI PTMP TE)" */
if (trace.port >= 0) {
mISDNport = mISDNport_first;
/* "Port: 1 (BRI PTMP TE)" */
if (trace.port >= 0) {
mISDNport = mISDNport_first;
@@
-132,6
+135,7
@@
static char *print_trace(int detail, int port, char *interface, char *caller, ch
SPRINT(buffer, "Port: %d (does not exist)\n", trace.port);
SCAT(trace_string, buffer);
} else
SPRINT(buffer, "Port: %d (does not exist)\n", trace.port);
SCAT(trace_string, buffer);
} else
+#endif
SCAT(trace_string, "Port: ---");
if (trace.interface[0]) {
SCAT(trace_string, "Port: ---");
if (trace.interface[0]) {
@@
-264,6
+268,7
@@
void _end_trace(const char *__file, int __line)
FILE *fp;
struct admin_list *admin;
struct admin_queue *response, **responsep; /* response pointer */
FILE *fp;
struct admin_list *admin;
struct admin_queue *response, **responsep; /* response pointer */
+ int ret;
if (!trace.name[0])
PERROR("trace not started in file %s line %d\n", __file, __line);
if (!trace.name[0])
PERROR("trace not started in file %s line %d\n", __file, __line);
@@
-273,12
+278,12
@@
void _end_trace(const char *__file, int __line)
if (string) {
/* process debug */
if (options.deb)
if (string) {
/* process debug */
if (options.deb)
- debug(NULL, 0, "TRACE", string);
+ debug(NULL,
NULL,
0, "TRACE", string);
/* process log */
if (options.log[0]) {
fp = fopen(options.log, "a");
if (fp) {
/* process log */
if (options.log[0]) {
fp = fopen(options.log, "a");
if (fp) {
- fwrite(string, strlen(string), 1, fp);
+
ret =
fwrite(string, strlen(string), 1, fp);
fclose(fp);
}
}
fclose(fp);
}
}
@@
-310,6
+315,7
@@
void _end_trace(const char *__file, int __line)
/* attach to response chain */
*responsep = response;
responsep = &response->next;
/* attach to response chain */
*responsep = response;
responsep = &response->next;
+ admin->fd.when |= LCR_FD_WRITE;
}
}
admin = admin->next;
}
}
admin = admin->next;