Fix compile error from most recent ast_channel opaquification installment.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 13 Feb 2012 21:36:26 +0000 (21:36 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 13 Feb 2012 21:36:26 +0000 (21:36 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355055 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_misdn.c

index 1402c83..7b3d448 100644 (file)
@@ -7280,10 +7280,10 @@ static struct ast_frame *process_ast_dsp(struct chan_list *tmp, struct ast_frame
                        switch (tmp->faxdetect) {
                        case 1:
                                if (strcmp(ast_channel_exten(ast), "fax")) {
-                                       char *context;
+                                       const char *context;
                                        char context_tmp[BUFFERSIZE];
                                        misdn_cfg_get(tmp->bc->port, MISDN_CFG_FAXDETECT_CONTEXT, &context_tmp, sizeof(context_tmp));
-                                       context = ast_strlen_zero(context_tmp) ? (ast_strlen_zero(ast_channel_macrocontext(ast)) ? ast_channel_context(ast) : ast_channel_macrocontext(ast)) : context_tmp;
+                                       context = S_OR(context_tmp, S_OR(ast_channel_macrocontext(ast), ast_channel_context(ast)));
                                        if (ast_exists_extension(ast, context, "fax", 1,
                                                S_COR(ast->caller.id.number.valid, ast->caller.id.number.str, NULL))) {
                                                ast_verb(3, "Redirecting %s to fax extension (context:%s)\n", ast_channel_name(ast), context);