summaryrefslogtreecommitdiff
path: root/channels/chan_misdn.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-06-14 23:01:01 +0000
committerRussell Bryant <russell@russellbryant.com>2007-06-14 23:01:01 +0000
commitb179e2155f886117b68499c5c918c82242728a86 (patch)
treeca14014e3c226332296ae0d687f996e9d8dfe6b2 /channels/chan_misdn.c
parent5dd9887ac7c638e8460f85ec2a93f5b490f15d6d (diff)
Convert uses of strdup() to ast_strdup()
(issue #9983, eliel) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_misdn.c')
-rw-r--r--channels/chan_misdn.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index e74972aa4..f8f671421 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -1409,7 +1409,7 @@ static char *complete_ch_helper(const char *line, const char *word, int pos, int
ast_mutex_unlock(&c->lock);
}
if (c) {
- ret = strdup(c->name);
+ ret = ast_strdup(c->name);
ast_mutex_unlock(&c->lock);
} else
ret = NULL;
@@ -1429,13 +1429,13 @@ static char *complete_debug_port (const char *line, const char *word, int pos, i
switch (pos) {
case 4:
if (*word == 'p')
- return strdup("port");
+ return ast_strdup("port");
else if (*word == 'o')
- return strdup("only");
+ return ast_strdup("only");
break;
case 6:
if (*word == 'o')
- return strdup("only");
+ return ast_strdup("only");
break;
}
return NULL;
@@ -1452,15 +1452,15 @@ static char *complete_show_config (const char *line, const char *word, int pos,
switch (pos) {
case 3:
if ((!strncmp(word, "description", wordlen)) && (++which > state))
- return strdup("description");
+ return ast_strdup("description");
if ((!strncmp(word, "descriptions", wordlen)) && (++which > state))
- return strdup("descriptions");
+ return ast_strdup("descriptions");
if ((!strncmp(word, "0", wordlen)) && (++which > state))
- return strdup("0");
+ return ast_strdup("0");
while ((port = misdn_cfg_get_next_port(port)) != -1) {
snprintf(buffer, sizeof(buffer), "%d", port);
if ((!strncmp(word, buffer, wordlen)) && (++which > state)) {
- return strdup(buffer);
+ return ast_strdup(buffer);
}
}
break;
@@ -1472,14 +1472,14 @@ static char *complete_show_config (const char *line, const char *word, int pos,
misdn_cfg_get_name(elem, buffer, sizeof(buffer));
if (!wordlen || !strncmp(word, buffer, wordlen)) {
if (++which > state)
- return strdup(buffer);
+ return ast_strdup(buffer);
}
}
} else if (strstr(line, "descriptions ")) {
if ((!wordlen || !strncmp(word, "general", wordlen)) && (++which > state))
- return strdup("general");
+ return ast_strdup("general");
if ((!wordlen || !strncmp(word, "ports", wordlen)) && (++which > state))
- return strdup("ports");
+ return ast_strdup("ports");
}
break;
}
@@ -1895,7 +1895,7 @@ static int read_config(struct chan_list *ch, int orig)
if ( !ast_strlen_zero(bc->rad) ) {
if (ast->cid.cid_rdnis)
ast_free(ast->cid.cid_rdnis);
- ast->cid.cid_rdnis = strdup(bc->rad);
+ ast->cid.cid_rdnis = ast_strdup(bc->rad);
}
misdn_cfg_get(bc->port, MISDN_CFG_OVERLAP_DIAL, &ch->overlap_dial, sizeof(ch->overlap_dial));