Changeset d309eb3 for message.c


Ignore:
Timestamp:
Oct 17, 2002, 3:00:57 PM (18 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:
e3869df
Parents:
aecf3e6
Message:
Fixed a memory bug in getsubs
Added receive support for zcrypt messages
Added the 'zcrypt' variable which controls whether or not zcrypt
    messages are decrypted
'reply' is disabled for zcrypt until sending zcrypt works
Started implementing zcrypt command
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    ra3ba748 rd309eb3  
    401401  m->body[k]='\0';
    402402
     403  /* if zcrypt is enabled try to decrypt the message */
     404  if (owl_global_is_zcrypt(&g) && !strcasecmp(n->z_opcode, "crypt")) {
     405    char *out;
     406
     407    out=owl_malloc(strlen(m->body)*16+20);
     408    zcrypt_decrypt(out, m->body, m->class, m->inst);
     409    owl_free(m->body);
     410    m->body=out;
     411  }
     412
    403413  /* save the hostname */
    404414  owl_function_debugmsg("About to do gethostbyaddr");
     
    547557  char *body, *indent, *ptr, *zsigbuff, frombuff[LINE];
    548558  ZNotice_t *n;
    549   int len;
    550 
     559
     560  n=&(m->notice);
     561 
    551562  /* get the body */
    552   n=&(m->notice);
    553   ptr=(owl_zephyr_get_message(n, &len));
    554   body=owl_malloc(len+20);
    555   strncpy(body, ptr, len);
    556   body[len]='\0';
     563  body=owl_malloc(strlen(m->body)+30);
     564  strcpy(body, m->body);
    557565
    558566  /* add a newline if we need to */
     
    650658  char *body, *indent, *ptr, *zsigbuff, frombuff[LINE];
    651659  ZNotice_t *n;
    652   int len;
     660
     661  n=&(m->notice);
    653662
    654663  /* get the body */
    655   n=&(m->notice);
    656   ptr=(owl_zephyr_get_message(n, &len));
    657   body=owl_malloc(len+20);
    658   strncpy(body, ptr, len);
    659   body[len]='\0';
     664  body=owl_malloc(strlen(m->body)+30);
     665  strcpy(body, m->body);
    660666
    661667  /* add a newline if we need to */
Note: See TracChangeset for help on using the changeset viewer.