chan_sip: Fix type mismatch when the format is changed.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 12 Aug 2014 23:45:17 +0000 (23:45 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 12 Aug 2014 23:45:17 +0000 (23:45 +0000)
Symptom is most likely an invalid ao2 object bad magic number message or a
less likely crash.
........

Merged revisions 420881 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420882 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 97ee23e..f28ad58 100644 (file)
@@ -4736,12 +4736,12 @@ static int sip_setoption(struct ast_channel *chan, int option, void *data, int d
        switch (option) {
        case AST_OPTION_FORMAT_READ:
                if (p->rtp) {
-                       res = ast_rtp_instance_set_read_format(p->rtp, (struct ast_format *) data);
+                       res = ast_rtp_instance_set_read_format(p->rtp, *(struct ast_format **) data);
                }
                break;
        case AST_OPTION_FORMAT_WRITE:
                if (p->rtp) {
-                       res = ast_rtp_instance_set_write_format(p->rtp, (struct ast_format *) data);
+                       res = ast_rtp_instance_set_write_format(p->rtp, *(struct ast_format **) data);
                }
                break;
        case AST_OPTION_DIGIT_DETECT: