Changeset 3c7d086a


Ignore:
Timestamp:
Sep 26, 2005, 3:48:37 PM (19 years ago)
Author:
Erik Nygren <nygren@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
0154e2d
Parents:
e74e573
Message:
Fix for BZ 90:
   crash when sending/logging outgoing AIM message and not logged in

Also made the message log deal with getting passed a NULL message.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    re74e573 r3c7d086a  
    11$Id$
    22
     32.1.12pre
     4        Don't crash when sending/logging outgoing
     5           AIM message and not logged in [BZ 90]
     6       
    372.1.11
    48        Don't crash doing zlocate with bad tickets. [BZ 12]
  • functions.c

    r15b34fd r3c7d086a  
    399399    m=owl_function_make_outgoing_zephyr(mymsg, line, owl_zwrite_get_zsig(&z));
    400400
    401     /* log it */
    402     owl_log_message(m);
    403 
    404     /* add it or nuke it */
    405     if (owl_global_is_displayoutgoing(&g)) {
    406       owl_function_add_message(m);
     401    if (m) {
     402      /* log it */
     403      owl_log_message(m);
     404     
     405      /* add it or nuke it */
     406      if (owl_global_is_displayoutgoing(&g)) {
     407        owl_function_add_message(m);
     408      } else {
     409        owl_message_free(m);
     410      }
    407411    } else {
    408       owl_message_free(m);
     412      owl_function_error("Could not create outgoing zephyr message");
    409413    }
    410414  }
     
    459463    mymsg=owl_zwrite_get_message(&z);
    460464    m=owl_function_make_outgoing_zephyr(mymsg, line, owl_zwrite_get_zsig(&z));
    461    
    462     /* log it */
    463     owl_log_message(m);
    464    
    465     /* add it or nuke it */
    466     if (owl_global_is_displayoutgoing(&g)) {
    467       owl_function_add_message(m);
     465    if (m) {
     466      /* log it */
     467      owl_log_message(m);
     468     
     469      /* add it or nuke it */
     470      if (owl_global_is_displayoutgoing(&g)) {
     471        owl_function_add_message(m);
     472      } else {
     473        owl_message_free(m);
     474      }
    468475    } else {
    469       owl_message_free(m);
     476      owl_function_error("Could not create outgoing zephyr message");
    470477    }
    471478  }
     
    498505  m=owl_function_make_outgoing_aim(msg, to);
    499506
    500   /* log it */
    501   owl_log_message(m);
    502 
    503   /* display it or nuke it */
    504   if (owl_global_is_displayoutgoing(&g)) {
    505     owl_function_add_message(m);
    506   } else {
    507     owl_message_free(m);
     507  if (m) {
     508    /* log it */
     509    owl_log_message(m);
     510   
     511    /* display it or nuke it */
     512    if (owl_global_is_displayoutgoing(&g)) {
     513      owl_function_add_message(m);
     514    } else {
     515      owl_message_free(m);
     516    }
     517  } else {
     518    owl_function_error("Could not create outgoing AIM message");
    508519  }
    509520
  • logging.c

    r180cd15 r3c7d086a  
    1313void owl_log_message(owl_message *m) {
    1414  owl_function_debugmsg("owl_log_message: entering");
     15
     16  if (m == NULL) {
     17    owl_function_debugmsg("owl_log_message: passed null message");
     18    return;
     19  }
    1520
    1621  /* should we be logging this message? */
Note: See TracChangeset for help on using the changeset viewer.