JR Richardson
2006-Dec-06 18:16 UTC
[asterisk-users] 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 <http://bugs.digium.com/file_download.php?file_id=4915&type=bug> and config.h.patch <http://bugs.digium.com/file_download.php?file_id=4898&type=bug> or config.c.patch <http://bugs.digium.com/file_download.php?file_id=4898&type=bug> . Thanks. JR JR Richardson Engineering for the Masses -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061206/8d4533cd/attachment.htm
JR Richardson
2006-Dec-06 18:30 UTC
[asterisk-users] RE: 0002475: [patch] Allow app_directory to work with REALTIME
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@gmail.com] Sent: Wednesday, December 06, 2006 7:17 PM To: 'asterisk-users@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