Changeset 2fa15f0


Ignore:
Timestamp:
Oct 30, 2006, 1:51:58 AM (18 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
f72f573
Parents:
f8b42ac
Message:
1) Fix massive memory leak. I've removed the variable that held the
mainloop hook name, replacing the two references to it with the
hard-coded function "owl::mainloop_hook". We were discussing doing
this anyhow, and since leak was in getting the variable over and over
again, this was the easiest way to deal.

2) Updated owlconf.pl in light of (1). Update your local copy!

3) jabber - groupchat history is not requested, and is explicitly
ignored.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r39c036d r2fa15f0  
    7272  int newmsgs, zpendcount, nexttimediff;
    7373  struct sigaction sigact;
    74   char *configfile, *tty, *perlout, *perlerr, **argvsave, buff[LINE], startupmsg[LINE], *perl_mainloop_hook;
     74  char *configfile, *tty, *perlout, *perlerr, **argvsave, buff[LINE], startupmsg[LINE];
    7575  owl_filter *f;
    7676  owl_style *s;
     
    9292  debug=0;
    9393  initialsubs=1;
    94   perl_mainloop_hook = NULL;
    9594  if (argc>0) {
    9695    argv++;
     
    448447
    449448    /* Hook perl into the loop */
    450     perl_mainloop_hook = owl_global_get_perl_mainloop_hook(&g);
    451     if (perl_mainloop_hook) {
    452       if (owl_perlconfig_is_function(perl_mainloop_hook)) {
    453         owl_function_debugmsg("startup: executing perl mainloop hook");
    454         perlout = owl_perlconfig_execute(perl_mainloop_hook);
    455         if (perlout) owl_free(perlout);
    456       }
     449
     450    if (owl_perlconfig_is_function("owl::mainloop_hook")) {
     451         perlout = owl_perlconfig_execute("owl::mainloop_hook");
     452         if (perlout) owl_free(perlout);
    457453    }
    458454
  • variable.c

    rbc220b2 r2fa15f0  
    356356               "delete a message right as it came in.\n" ),
    357357
    358   OWLVAR_STRING( "perl_mainloop_hook" /* %OwlVarStub */, NULL,
    359                  "mainloop hook to perl",
    360                  "If this variable is set, owl will call to the perl function\n"
    361                  "specified." ),
    362  
    363358  /* This MUST be last... */
    364359  { NULL, 0, NULL, 0, NULL, NULL, NULL, NULL,
Note: See TracChangeset for help on using the changeset viewer.