aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-10-08 21:57:43 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-10-08 21:57:43 +0000
commit1b1186d189096dc6f172d3f1b0847300a83114da (patch)
tree23483497d440c7587e81e34a792dad9247bd5ffd
parenta05adac17e144c7f2916f3df28b4e0fe9850e7fa (diff)
Callerid fix and warning cleanup (bug #367 & #356)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1621 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xcallerid.c2
-rwxr-xr-xchannels/chan_zap.c4
-rwxr-xr-xframe.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/callerid.c b/callerid.c
index 0a0883eb3..3766f4b0b 100755
--- a/callerid.c
+++ b/callerid.c
@@ -110,8 +110,8 @@ struct callerid_state *callerid_new(void)
{
struct callerid_state *cid;
cid = malloc(sizeof(struct callerid_state));
- memset(cid, 0, sizeof(struct callerid_state));
if (cid) {
+ memset(cid, 0, sizeof(struct callerid_state));
cid->fskd.spb = 7; /* 1200 baud */
cid->fskd.hdlc = 0; /* Async */
cid->fskd.nbit = 8; /* 8 bits */
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 723c466b1..75bead1c1 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -4359,6 +4359,8 @@ static void *ss_thread(void *data)
} else
ast_log(LOG_WARNING, "Unable to get caller ID space\n");
}
+ else
+ cs = NULL;
if (name && number) {
snprintf(cid, sizeof(cid), "\"%s\" <%s>", name, number);
} else if (name) {
@@ -4368,6 +4370,8 @@ static void *ss_thread(void *data)
} else {
strcpy(cid, "");
}
+ if (cs)
+ callerid_free(cs);
if (strlen(cid)) {
chan->callerid = strdup(cid);
chan->ani = strdup(cid);
diff --git a/frame.c b/frame.c
index 36ac0e1da..0ff9d2a1e 100755
--- a/frame.c
+++ b/frame.c
@@ -455,8 +455,7 @@ static int show_codecs(int fd, int argc, char *argv[])
return RESULT_SHOWUSAGE;
if (getenv("I_AM_NOT_AN_IDIOT") == NULL)
- ast_cli(fd, "Disclaimer: this command is for informational purposes
-only.\n\tIt does not indicate anything about your configuration.\n");
+ ast_cli(fd, "Disclaimer: this command is for informational purposes only.\n\tIt does not indicate anything about your configuration.\n");
if ((argc == 2) || (!strcasecmp(argv[1],"audio"))) {
found = 1;