Text   |  XML   |  ReML   |   Visible Warnings:

Unused Value  at iax2_analysis.c:637

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

iax2_packet_add_info

(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/iax2_analysis.c)expand/collapse
Show more  
 609  static int iax2_packet_add_info(GtkWidget *list, user_data_t * user_data,
 610          tap_iax2_stat_t *statinfo, packet_info *pinfo,
 611          const struct _iax2_info_t *iax2info _U_)
 612  {
 613          guint16 msecs;
 614          gchar timeStr[32];
 615          struct tm *tm_tmp;
 616          time_t then;
 617          gchar status[40];
 618          GdkColor color = COLOR_DEFAULT;
 619          gchar color_str[14];
 620          then = pinfo->fd->abs_ts.secs;
 621          msecs = (guint16)(pinfo->fd->abs_ts.nsecs/1000000);
 622          tm_tmp = localtime(&then);
 623          g_snprintf(timeStr,sizeof(timeStr),"%02d/%02d/%04d %02d:%02d:%02d.%03d",
 624                  tm_tmp->tm_mon + 1,
 625                  tm_tmp->tm_mday,
 626                  tm_tmp->tm_year + 1900,
 627                  tm_tmp->tm_hour,
 628                  tm_tmp->tm_min,
 629                  tm_tmp->tm_sec,
 630                  msecs);
 631                   
 632          /* Default to using black on white text if nothing below overrides it */
 633          g_snprintf(color_str,sizeof(color_str),"#ffffffffffff");
 634   
 635          if (statinfo->flags & STAT_FLAG_WRONG_SEQ) {
 636                  g_snprintf(status,sizeof(status),"Wrong sequence nr.");
 637                  color = COLOR_ERROR;
 638                  g_snprintf(color_str,sizeof(color_str),"#ffffbfffbfff");
 639          }
 640          else if (statinfo->flags & STAT_FLAG_REG_PT_CHANGE) {
 641                  g_snprintf(status,sizeof(status),"Payload changed to PT=%u", statinfo->pt);
 642                  color = COLOR_WARNING;
 643                  g_snprintf(color_str,sizeof(color_str),"#ffffdfffbfff");
 644          }
 645          else if (statinfo->flags & STAT_FLAG_WRONG_TIMESTAMP) {
 646                  g_snprintf(status,sizeof(status),"Incorrect timestamp");
 647                  color = COLOR_WARNING;
 648                  g_snprintf(color_str,sizeof(color_str),"#ffffdfffbfff");
 649          }
 650          else if ((statinfo->flags & STAT_FLAG_PT_CHANGE)
 651                  &&  !(statinfo->flags & STAT_FLAG_FIRST)
 652                  &&  !(statinfo->flags & STAT_FLAG_PT_CN)
 653                  &&  (statinfo->flags & STAT_FLAG_FOLLOW_PT_CN)
 654                  &&  !(statinfo->flags & STAT_FLAG_MARKER)) {
 655                  g_snprintf(status,sizeof(status),"Marker missing?");
 656                  color = COLOR_WARNING;
 657                  g_snprintf(color_str,sizeof(color_str),"#ffffdfffbfff");
 658          }
 659          else {
 660                  if (statinfo->flags & STAT_FLAG_MARKER) {
 661                          color = COLOR_WARNING;
 662                          g_snprintf(color_str,sizeof(color_str),"#ffffdfffbfff");
 663                  }
 664                  g_snprintf(status,sizeof(status),OK_TEXT);
 665          }
 666          /*  is this the first packet we got in this direction? */
 667          if (statinfo->flags & STAT_FLAG_FIRST) {
 668                  add_to_list(list, user_data,
 669                          pinfo->fd->num,  
 670                          0,
 671                          0,
 672                          statinfo->bandwidth,
 673                          status,
 674                          timeStr, pinfo->fd->pkt_len,
 675                          color_str,
 676                          statinfo->flags);
 677          }
 678          else {
 679                  add_to_list(list, user_data,
 680                          pinfo->fd->num,  
 681                          statinfo->delta*1000,
 682                          statinfo->jitter*1000,
 683                          statinfo->bandwidth,
 684                          status,
 685                          timeStr, pinfo->fd->pkt_len,
 686                          color_str,
 687                          statinfo->flags);
 688          }
 689          return 0;
 690  }
Show more  




Change Warning 4379.30165 : Unused Value

Priority:
State:
Finding:
Owner:
Note: