Changeset 24ccc01 for zwrite.c


Ignore:
Timestamp:
Aug 26, 2009, 11:50:56 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
e2ebf39
Parents:
36486be
git-author:
Nelson Elhage <nelhage@mit.edu> (08/19/09 23:41:06)
git-committer:
Nelson Elhage <nelhage@mit.edu> (08/26/09 23:50:56)
Message:
Replace owl_message_create_from_zwriteline with owl_message_create_from_zwrite.

By passing in a zwrite structure instead of a line, we make it easier to
construct faked messages without having to go through generaring and
parsing a zwrite command line. We change owl_zephyr_handle_ack to fake a
zwrite structure, fixing the segfault on zephyring users with
quotes (fixes #94), as well as logging errors sending instanced personals
slightly better.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zwrite.c

    r36486be r24ccc01  
    2424  z->noping=0;
    2525  owl_list_create(&(z->recips));
     26  z->zwriteline = owl_strdup(line);
    2627
    2728  /* parse the command line for options */
     
    350351}
    351352
     353void owl_zwrite_set_zsig(owl_zwrite *z, const char *zsig)
     354{
     355  if(z->zsig) owl_free(z->zsig);
     356  z->zsig = owl_strdup(zsig);
     357}
     358
    352359void owl_zwrite_get_recipstr(const owl_zwrite *z, char *buff)
    353360{
     
    390397{
    391398  owl_list_free_all(&(z->recips), &owl_free);
     399  if (z->zwriteline) owl_free(z->zwriteline);
    392400  if (z->class) owl_free(z->class);
    393401  if (z->inst) owl_free(z->inst);
Note: See TracChangeset for help on using the changeset viewer.