[asterisk-users] RE: 0002475: [patch] Allow app_directory to work with REALTIME

JR Richardson jmr.richardson at gmail.com
Wed Dec 6 18:30:53 MST 2006


I tried the patch.  The config.c.patch was ok, the app_directory patch
failed:

lab1:/usr/src/asterisk-1.2.9.1/apps# more app_directory.c.rej 
***************
*** 426,437 ****
                ast_log(LOG_WARNING, "directory requires an argument
(context[,dialcontext])\n");
                return -1;
        }
-       cfg = ast_config_load(DIRECTORY_CONFIG);
-       if (!cfg) {
-               ast_log(LOG_WARNING, "Unable to open directory configuration
%s\n", DIRECTORY_CONFIG
);
-               return -1;
-       }
-       LOCAL_USER_ADD(u);
  top:
        context = ast_strdupa(data);
        dialcontext = strchr(context, '|');
--- 492,498 ----
                ast_log(LOG_WARNING, "directory requires an argument
(context[,dialcontext])\n");
                return -1;
        }
+ 
  top:
        context = ast_strdupa(data);
        dialcontext = strchr(context, '|');
***************
*** 447,452 ****
                }
        } else
                dialcontext = context;
        dirintro = ast_variable_retrieve(cfg, context, "directoryintro");
        if (!dirintro || ast_strlen_zero(dirintro))
                dirintro = ast_variable_retrieve(cfg, "general",
"directoryintro");
--- 508,522 ----
                }
        } else
                dialcontext = context;
+ 
+       cfg = realtime_directory(context);
+       if (!cfg) {
+               ast_log(LOG_WARNING, "Unable to open/create directory
configuration %s\n", DIRECTORY
_CONFIG);
+               return -1;
+       }
+ 
+       LOCAL_USER_ADD(u);
+ 
        dirintro = ast_variable_retrieve(cfg, context, "directoryintro");
        if (!dirintro || ast_strlen_zero(dirintro))
                dirintro = ast_variable_retrieve(cfg, "general",
"directoryintro");

________________________________________
From: JR Richardson [mailto:jmr.richardson at gmail.com] 
Sent: Wednesday, December 06, 2006 7:17 PM
To: 'asterisk-users at lists.digium.com'
Subject: 0002475: [patch] Allow app_directory to work with REALTIME

Hi All,

I’m running 1.2.9.1 stable.  I’m wondering has this patch been applied to
stable release or is it still only in CVS.  Will this file patch apply
correctly to 1.2.9.1 stable?  Which file do I patch?  I’m guessing
app_directory_realtime_1.6.1.patch and  config.h.patch or  config.c.patch.

Thanks.

JR

JR Richardson
Engineering for the Masses




More information about the asterisk-users mailing list