Changeset 8fec514


Ignore:
Timestamp:
Oct 12, 2002, 12:46:42 PM (19 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
a3ba748
Parents:
aa2f6364
Message:
Fixed memory access bug in new outgoing message creation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r2527615 r8fec514  
    9696  owl_message_create_from_zwriteline(m, zwriteline, body, zsig);
    9797
    98   /* add it to the global list */
     98  /* add it to the global list and current view */
    9999  owl_messagelist_append_element(owl_global_get_msglist(&g), m);
    100100  owl_view_consider_message(owl_global_get_current_view(&g), m);
     
    154154
    155155void owl_function_zwrite(char *line) {
    156   char buff[1024];
    157156  owl_zwrite z;
    158157  int i, j;
     
    165164  /* display the message as an outgoing message in the receive window */
    166165  if (owl_global_is_displayoutgoing(&g) && owl_zwrite_is_personal(&z)) {
    167     owl_zwrite_get_recipstr(&z, buff);
    168166    owl_function_make_outgoing_zephyr(owl_editwin_get_text(owl_global_get_typwin(&g)), line, owl_zwrite_get_zsig(&z));
    169167  }
  • message.c

    rb12c219 r8fec514  
    437437  owl_message_set_direction_out(m);
    438438  owl_message_set_type_zephyr(m);
    439   m->sender=owl_strdup(ZGetSender());
    440   m->class=owl_strdup(owl_zwrite_get_class(&z));
    441   m->inst=owl_strdup(owl_zwrite_get_instance(&z));
     439  owl_message_set_sender(m, ZGetSender());
     440  owl_message_set_class(m, owl_zwrite_get_class(&z));
     441  owl_message_set_instance(m, owl_zwrite_get_instance(&z));
    442442  m->recip=long_zuser(owl_zwrite_get_recip_n(&z, 0)); /* only gets the first user, must fix */
    443   m->opcode=owl_strdup(owl_zwrite_get_opcode(&z));
     443  owl_message_set_opcode(m, owl_zwrite_get_opcode(&z));
    444444  m->realm=owl_strdup(owl_zwrite_get_realm(&z)); /* also a hack, but not here */
    445445  m->zwriteline=owl_strdup(line);
    446446  m->body=owl_strdup(body);
    447   m->zsig=owl_strdup(zsig);
     447  owl_message_set_zsig(m, zsig);
    448448 
    449449  /* save the hostname */
     
    499499  owl_fmtext_append_normal(&(m->fmtext), "  (Zsig: ");
    500500
    501   zsigbuff=owl_malloc(strlen(owl_message_get_zsig(m)));
     501  zsigbuff=owl_malloc(strlen(owl_message_get_zsig(m))+30);
    502502  owl_message_pretty_zsig(m, zsigbuff);
    503503  owl_fmtext_append_ztext(&(m->fmtext), zsigbuff);
Note: See TracChangeset for help on using the changeset viewer.