Author: mmichelson
Date: Fri Jul 20 13:42:27 2007
New Revision: 76139

URL: http://svn.digium.com/view/asterisk?view=rev&rev=76139
Log:
When using users.conf for the entries in the directory, if multiple users had 
the same last name, only the first user listed would be available
in the directory.

(closes issue #10200, reported by mrskippy, patched by me)


Modified:
    branches/1.4/apps/app_directory.c

Modified: branches/1.4/apps/app_directory.c
URL: 
http://svn.digium.com/view/asterisk/branches/1.4/apps/app_directory.c?view=diff&rev=76139&r1=76138&r2=76139
==============================================================================
--- branches/1.4/apps/app_directory.c (original)
+++ branches/1.4/apps/app_directory.c Fri Jul 20 13:42:27 2007
@@ -404,6 +404,7 @@
        int lastuserchoice = 0;
        char *start, *conv, *stringp = NULL;
        const char *pos;
+       int breakout = 0;
 
        if (ast_strlen_zero(context)) {
                ast_log(LOG_WARNING,
@@ -527,6 +528,7 @@
                                                                 * user hungup
                                                                 */
                                                                lastuserchoice 
= 0;
+                                                               breakout = 1;
                                                                break;
                                                        case '1':
                                                                /* user pressed 
'1' and extensions exists;
@@ -534,19 +536,24 @@
                                                                   a goto() on 
the channel
                                                                 */
                                                                lastuserchoice 
= res;
+                                                               breakout = 1;
                                                                break;
                                                        case '*':
                                                                /* user pressed 
'*' to skip something found */
                                                                lastuserchoice 
= res;
+                                                               breakout = 0;
                                                                res = 0;
                                                                break;
                                                        default:
+                                                               breakout = 1;
                                                                break;
                                                        }
                                                        free(conv);
-                                                       break;
+                                                       if (breakout)
+                                                               break;
                                                }
-                                               free(conv);
+                                               else
+                                                       free(conv);
                                        }
                                }
                        }


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to