Ethereal-dev: [Ethereal-dev] Problem with saving conversation data

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Yaniv Kaul <ykaul@xxxxxxxxxxxx>
Date: Tue, 18 May 2004 13:22:55 +0200
Hi all,

I'm trying to save some conversation data, and fail, for some reason. I'm saving it when I'm creating the conversation:

conv = find_conversation(&pinfo->src, &pinfo->dst, pinfo->ptype,pinfo->srcport, pinfo->destport, 0);
       if (conv == NULL) {
conv = conversation_new(&pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
               t_i = g_malloc(sizeof(struct tds_info_t));
               t_i->is_ssl = TRUE;
               conversation_add_proto_data(conv, proto_tds, t_i);
       }
       conversation_set_dissector(conv, tds_tcp_handle);
...
and trying to retrieve it later:
conversation = find_conversation(&pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
                       if(conversation) {
tds_i = conversation_get_proto_data(conversation, proto_tds);
                               if(tds_i && tds_i->is_ssl == TRUE) {
ssl_tvb = tvb_new_subset(tvb, offset, -1, -1); call_dissector(ssl_handle, ssl_tvb, pinfo, tree);
                               }
                               else
proto_tree_add_text(tree, tvb, offset, -1, "unknown data");
...

Any ideas what am I doing wrong? I do get the conversation, but tds_i is always null.