Changeset 24ccc01 for logging.c


Ignore:
Timestamp:
Aug 26, 2009, 11:50:56 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, 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
  • logging.c

    r4542047 r24ccc01  
    171171
    172172
    173 void owl_log_outgoing_zephyr_error(const char *to, const char *text)
     173void owl_log_outgoing_zephyr_error(const owl_zwrite *zw, const char *text)
    174174{
    175175  FILE *file;
     
    181181   * owl_log_shouldlog_message()
    182182   */
    183   zwriteline=owl_sprintf("zwrite %s", to);
    184   m=owl_function_make_outgoing_zephyr(text, zwriteline, "");
    185   owl_free(zwriteline);
     183  m = owl_malloc(sizeof(owl_message));
     184  owl_message_create_from_zwrite(m, zw, text);
    186185  if (!owl_log_shouldlog_message(m)) {
    187186    owl_message_free(m);
     
    191190
    192191  /* chop off a local realm */
    193   tobuff=short_zuser(to);
     192  tobuff = short_zuser(owl_list_get_element(&(zw->recips), 0));
    194193
    195194  /* expand ~ in path names */
Note: See TracChangeset for help on using the changeset viewer.