main/manager.c: Bugfix sort action_manager by alphabetically
authorRodrigo Ramírez Norambuena <decipher.hk@gmail.com>
Tue, 5 May 2015 01:11:56 +0000 (21:11 -0400)
committerRodrigo Ramírez Norambuena <decipher.hk@gmail.com>
Wed, 6 May 2015 08:09:59 +0000 (04:09 -0400)
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 17a2738..60e185b 100644 (file)
@@ -6781,9 +6781,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");