[487] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: [D-O-H] r610 - trunk/owl

daemon@ATHENA.MIT.EDU (Zev Benjamin)
Thu Oct 29 18:06:42 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
Date: Thu, 15 Feb 2007 23:08:27 -0500
From: Zev Benjamin <zev@MIT.EDU>
To: dirty-owl-hackers@MIT.EDU
In-Reply-To: <20070215225114.8112D834109@darkmatter.mit.edu>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I haven't looked at the relevant zephyr code, but what does
owl_zephyr_get_field do if the given field doesn't exist?  Is -c discuss
ACL'd?  If not, it's possible to send a zephyr to -c discuss that does
not have the extra fields.  It would be bad for barnowl to segfault from
such a situation.  If this doesn't affect -c discuss messages, does it
affect any of the other special-cased classes?


Zev

asedeno@MIT.EDU wrote:
> Author: asedeno
> Date: 2007-02-15 17:51:14 -0500 (Thu, 15 Feb 2007)
> New Revision: 610
> 
> Modified:
>    trunk/owl/zephyr.c
> Log:
> Tweak for MIT's -c DISCUSS messages.
> 
> 
> 
> Modified: trunk/owl/zephyr.c
> ===================================================================
> --- trunk/owl/zephyr.c	2007-02-15 22:10:58 UTC (rev 609)
> +++ trunk/owl/zephyr.c	2007-02-15 22:51:14 UTC (rev 610)
> @@ -389,6 +389,31 @@
>        return msg;
>      }
>    }
> +  /* deal with MIT Discuss messages */
> +  else if (!strcasecmp(n->z_sender, "daemon@ATHENA.MIT.EDU") &&
> +	   !strcasecmp(n->z_class, "DISCUSS")) {
> +    /*New transaction [$1] entered in $2
> +      From: $3 ($5)
> +      Subject: $4 */
> +    
> +    char *msg, *field1, *field2, *field3, *field4, *field5;
> +    
> +    field1 = owl_zephyr_get_field(n, 1);
> +    field2 = owl_zephyr_get_field(n, 2);
> +    field3 = owl_zephyr_get_field(n, 3);
> +    field4 = owl_zephyr_get_field(n, 4);
> +    field5 = owl_zephyr_get_field(n, 5);
> +    
> +    msg = owl_sprintf("New transaction [%s] entered in %s\nFrom: %s (%s)\nSubject: %s", field1, field2, field3, field5, field4);
> +    owl_free(field1);
> +    owl_free(field2);
> +    owl_free(field3);
> +    owl_free(field4);
> +    owl_free(field5);
> +    if (msg) {
> +      return msg;
> +    }
> +  }
>  
>    return(owl_zephyr_get_field(n, 2));
>  }
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF1S47lO3j8HLL0+4RAsG2AJ0QlyjhuFKi73E1Pb7R0Ps/P7//vACfeXYq
OhvP1enAjsm2SPdSqpadnMc=
=NA6m
-----END PGP SIGNATURE-----

home help back first fref pref prev next nref lref last post