]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't crash when forcing caller id.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 15 Feb 2011 19:52:45 +0000 (19:52 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 15 Feb 2011 19:52:45 +0000 (19:52 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@307962 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c

index e24a72e042b3130b93f87b1eb9464a0ed9989c92..4dd29e0e7672d445251894fb003d7bf548cf1248 100644 (file)
@@ -2095,7 +2095,7 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
                        struct ast_party_connected_line connected;
                        int pres;
 
-                       ast_party_connected_line_set_init(&connected, &tmp->chan->connected);
+                       ast_party_connected_line_set_init(&connected, &tc->connected);
                        if (cid_pres) {
                                pres = ast_parse_caller_presentation(cid_pres);
                                if (pres < 0) {
@@ -2115,7 +2115,7 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
                                connected.id.name.presentation = pres;
                        }
                        connected.id.tag = cid_tag;
-                       ast_channel_set_connected_line(tmp->chan, &connected, NULL);
+                       ast_channel_set_connected_line(tc, &connected, NULL);
                } else {
                        ast_connected_line_copy_from_caller(&tc->connected, &chan->caller);
                }