]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
main/manager.c: Bugfix sort action_manager by alphabetically 59/459/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:20 +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 9aa8ecf796e2795c76a932fccaa61d16ea8ddeb0..035115fc431dc3a30e144975789e760028e4f692 100644 (file)
@@ -6755,9 +6755,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");