]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
main/manager.c: Bugfix sort action_manager by alphabetically 58/458/1
authorRodrigo Ramírez Norambuena <decipher.hk@gmail.com>
Tue, 5 May 2015 01:11:56 +0000 (21:11 -0400)
committerRodrigo Ramirez Norambuena <decipher.hk@gmail.com>
Wed, 13 May 2015 15:46:13 +0000 (10:46 -0500)
Fix the alphabetic order added on ast_manager_register_struct. The order
for struct manager_action added is not working, this change fixes the
problem.

Change-Id: I149da0cd06c3c4445d7516cc303358e9f26f8b4b

main/manager.c

index 8828a4fd8b35fa7db702a9d61cf33a7d3cd72ff7..d5e3273f5ecde63562687301566a443ac29e94e1 100644 (file)
@@ -5909,9 +5909,9 @@ static int ast_manager_register_struct(struct manager_action *act)
                        return -1;
                }
                if (ret > 0) { /* Insert these alphabetically */
-                       prev = cur;
                        break;
                }
+               prev = cur;
        }
 
        ao2_t_ref(act, +1, "action object added to list");