From Alejandro Vaquero:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 24 Oct 2006 05:17:49 +0000 (05:17 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 24 Oct 2006 05:17:49 +0000 (05:17 +0000)
Find attached a patch for this bug. The problem was actually in the "Voip Calls" logic, when the first RTP packet was after the last signaling packet (e.g. a call connected and the release not captured), that caused the RTP to not be added to the graph list and therefor to the player.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19667 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/voip_calls.c

index 431a74b0d358343f987c431aad5cd768446cff72..daadca553c64b0cf77d2e50329520e8e207e24f4 100644 (file)
@@ -611,8 +611,14 @@ static void RTP_packet_draw(void *prs _U_)
                                                g_free(gai->comment);
                                                gai->comment = g_strdup_printf("RTP Num packets:%u  Duration:%u.%03us ssrc:%u", rtp_listinfo->npackets, duration/1000000,(duration%1000000)/1000, rtp_listinfo->ssrc);
                                                break;
                                                g_free(gai->comment);
                                                gai->comment = g_strdup_printf("RTP Num packets:%u  Duration:%u.%03us ssrc:%u", rtp_listinfo->npackets, duration/1000000,(duration%1000000)/1000, rtp_listinfo->ssrc);
                                                break;
+                                       }
+
+                                       /* we increment the list here to be able to check if it is the last item in this calls, which means the RTP is after so we have to draw it */
+                                       voip_calls_graph_list = g_list_next(voip_calls_graph_list);
+                                       if (!voip_calls_graph_list) item++;
+
                                        /* add the RTP item to the graph if was not there*/
                                        /* add the RTP item to the graph if was not there*/
-                                       } else if (rtp_listinfo->first_frame_num<gai->frame_num){
+                                       if (rtp_listinfo->first_frame_num<gai->frame_num || !voip_calls_graph_list){
                                                new_gai = g_malloc(sizeof(graph_analysis_item_t));
                                                new_gai->frame_num = rtp_listinfo->first_frame_num;
                                                new_gai->time = (double)rtp_listinfo->start_rel_sec + (double)rtp_listinfo->start_rel_usec/1000000;
                                                new_gai = g_malloc(sizeof(graph_analysis_item_t));
                                                new_gai->frame_num = rtp_listinfo->first_frame_num;
                                                new_gai->time = (double)rtp_listinfo->start_rel_sec + (double)rtp_listinfo->start_rel_usec/1000000;
@@ -630,9 +636,7 @@ static void RTP_packet_draw(void *prs _U_)
                                                the_tapinfo_struct.graph_analysis->list = g_list_insert(the_tapinfo_struct.graph_analysis->list, new_gai, item);
                                                break;
                                        }
                                                the_tapinfo_struct.graph_analysis->list = g_list_insert(the_tapinfo_struct.graph_analysis->list, new_gai, item);
                                                break;
                                        }
-                                       
-                                       voip_calls_graph_list = g_list_next(voip_calls_graph_list);
-                                       item++;
+                                       if (voip_calls_graph_list) item++;
                                }
                                break;
                        }
                                }
                                break;
                        }