Changeset 180cd15


Ignore:
Timestamp:
Jan 4, 2005, 11:29:48 PM (16 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:
176d3443
Parents:
15b34fd
Message:
Now deals with the special case of logging failed zwrites correctly
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • logging.c

    r15b34fd r180cd15  
    126126  FILE *file;
    127127  char filename[MAXPATHLEN], *logpath;
    128   char *tobuff;
    129 
     128  char *tobuff, *zwriteline;
     129  owl_message *m;
     130
     131  /* create a present message so we can pass it to
     132   * owl_log_shouldlog_message()
     133   */
     134  zwriteline=owl_sprintf("zwrite %s", to);
     135  m=owl_function_make_outgoing_zephyr(text, zwriteline, "");
     136  owl_free(zwriteline);
     137  if (!owl_log_shouldlog_message(m)) {
     138    owl_message_free(m);
     139    return;
     140  }
     141  owl_message_free(m);
     142
     143  /* chop off a local realm */
    130144  tobuff=short_zuser(to);
    131145
  • zephyr.c

    r15b34fd r180cd15  
    480480      char buff[1024];
    481481      tmp = short_zuser(retnotice->z_recipient);
    482       owl_function_error("%s: Not logged in or subscribing to messages.",
    483                            tmp);
    484 
     482      owl_function_error("%s: Not logged in or subscribing to messages.", tmp);
    485483      sprintf(buff, "Could not send message to %s: not logged in or subscribing to messages.\n", tmp);
    486484      owl_function_adminmsg("", buff);
    487       if (owl_global_is_logging(&g)) owl_log_outgoing_zephyr_error(tmp, buff);
     485      owl_log_outgoing_zephyr_error(tmp, buff);
    488486      owl_free(tmp);
    489487    }
Note: See TracChangeset for help on using the changeset viewer.