Fix compiler warnings.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 19 Jul 2012 22:25:00 +0000 (22:25 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 19 Jul 2012 22:25:00 +0000 (22:25 +0000)
gcc (GCC) 4.2.4 has problems casting away constness.
........

Merged revisions 370275 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 370277 from http://svn.asterisk.org/svn/asterisk/branches/10

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

main/cel.c

index 785b791..35f78ca 100644 (file)
@@ -505,11 +505,10 @@ struct ast_channel *ast_cel_fabricate_channel_from_event(const struct ast_event
                return NULL;
        }
 
-       ast_channel_appl_set(tchan, app_data);
-       ast_channel_data_set(tchan, app_data + strlen(record.application_name) + 1);
+       ast_channel_appl_set(tchan, strcpy(app_data, record.application_name));
+       ast_channel_data_set(tchan, strcpy(app_data + strlen(record.application_name) + 1,
+               record.application_data));
 
-       strcpy((char *) ast_channel_appl(tchan), record.application_name);
-       strcpy((char *) ast_channel_data(tchan), record.application_data);
        datastore->data = app_data;
        ast_channel_datastore_add(tchan, datastore);