Changeset 3f3ee61


Ignore:
Timestamp:
Oct 29, 2008, 9:38:18 PM (12 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
7e78e49
Parents:
e979da9
Message:
Factor the code used to populate zsigs out of the function used to
parse zwrite lines, and call it only when we're sending a message.
Now users with a zsigproc will only have it called once when sending a
zephyr.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r559076c r3f3ee61  
    378378  /* create the zwrite and send the message */
    379379  owl_zwrite_create_from_line(&z, line);
     380  owl_zwrite_populate_zsig(&z);
    380381  if (msg) {
    381382    owl_zwrite_set_message(&z, msg);
     
    416417  /* create the zwrite and send the message */
    417418  owl_zwrite_create_from_line(&z, line);
     419  owl_zwrite_populate_zsig(&z);
    418420  if (msg) {
    419421    owl_zwrite_set_message(&z, msg);
  • zwrite.c

    r7b1d048 r3f3ee61  
    1111  int argc, badargs, myargc;
    1212  char **argv, **myargv;
    13   char *zsigproc, *zsigowlvar, *zsigzvar, *ptr;
    14   struct passwd *pw;
    1513
    1614  badargs=0;
     
    139137  /* z->message is allowed to stay NULL */
    140138 
     139  return(0);
     140}
     141
     142void owl_zwrite_populate_zsig(owl_zwrite *z)
     143{
     144  char *zsigproc, *zsigowlvar, *zsigzvar, *ptr;
     145  struct passwd *pw;
     146
    141147  /* get a zsig, if not given */
    142148  if (z->zsig==NULL) {
     
    184190    }
    185191  }
    186 
    187   return(0);
    188192}
    189193
     
    285289    owl_zwrite_set_message(&z, msg);
    286290  }
     291  owl_zwrite_populate_zsig(&z);
    287292  owl_zwrite_send_message(&z);
    288293  owl_zwrite_free(&z);
     
    358363  return(0);
    359364}
    360  
     365
    361366void owl_zwrite_free(owl_zwrite *z)
    362367{
Note: See TracChangeset for help on using the changeset viewer.