Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 30279: /trunk/epan/dissectors/ /trun
From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Sun, 04 Oct 2009 10:45:57 -0400
krj@xxxxxxxxxxxxx wrote:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=30279

User: krj
Date: 2009/10/04 12:04 AM

Log:
 Don't clear and append string to column. Just add it (which will clear the column)


My understanding from README.developer is that col_clear(...,INFO_COL) should be used before any tvb_get_... calls in case one of them throws an exception. Sound right ?? :)

Bill




	if (check_col(pinfo->cinfo, COL_INFO)) {
	   -->  col_clear(....,Col_INFO);
		seq_num = tvb_get_ntohl(tvb, 4);
		sender_id = tvb_get_ntohs(tvb, 8);
		tvb_memcpy(tvb, team_id, 10, 6);

col_add_fstr(pinfo->cinfo, COL_INFO, "Sequence: %u, Sender ID %u, Team ID %s",
			seq_num, sender_id, ether_to_str(team_id));
	}