]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add missing frame types to func_frame_trace
authorTerry Wilson <twilson@digium.com>
Fri, 16 Sep 2011 22:04:25 +0000 (22:04 +0000)
committerTerry Wilson <twilson@digium.com>
Fri, 16 Sep 2011 22:04:25 +0000 (22:04 +0000)
Also casts control frames to the proper enum so that the compile will catch
new additions.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@336312 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_frame_trace.c

index 1b56bab9953ef7cf0aea75153c6bfe557da4167d..86cb4612541a6ca68f34d5b903eb4a2b7cee7af7 100644 (file)
@@ -227,7 +227,7 @@ static void print_frame(struct ast_frame *frame)
                break;
        case AST_FRAME_CONTROL:
                ast_verbose("FrameType: CONTROL\n");
-               switch (frame->subclass.integer) {
+               switch ((enum ast_control_frame_type) frame->subclass.integer) {
                case AST_CONTROL_HANGUP:
                        ast_verbose("SubClass: HANGUP\n");
                        break;
@@ -315,7 +315,14 @@ static void print_frame(struct ast_frame *frame)
                case AST_CONTROL_INCOMPLETE:
                        ast_verbose("SubClass: INCOMPLETE\n");
                        break;
+                case AST_CONTROL_END_OF_Q:
+                       ast_verbose("SubClass: END_OF_Q\n");
+                       break;
+               case AST_CONTROL_UPDATE_RTP_PEER:
+                       ast_verbose("SubClass: UPDATE_RTP_PEER\n");
+                       break;
                }
+               
                if (frame->subclass.integer == -1) {
                        ast_verbose("SubClass: %d\n", frame->subclass.integer);
                }