- Timestamp:
- Mar 28, 2009, 5:00:34 PM (15 years ago)
- Branches:
- owl
- Children:
- 4de643d
- Parents:
- 5189631
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
message.c
r8298425 rdab82f29 1 /* Copyright (c) 2002,2003,2004,2009 James M. Kretchmar 2 * 3 * This file is part of Owl. 4 * 5 * Owl is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * Owl is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with Owl. If not, see <http://www.gnu.org/licenses/>. 17 * 18 * --------------------------------------------------------------- 19 * 20 * As of Owl version 2.1.12 there are patches contributed by 21 * developers of the the branched BarnOwl project, Copyright (c) 22 * 2006-2008 The BarnOwl Developers. All rights reserved. 23 */ 24 1 25 #include <stdlib.h> 2 26 #include <unistd.h> … … 20 44 m->delete=0; 21 45 m->hostname=owl_strdup(""); 22 m->zwriteline= strdup("");46 m->zwriteline=NULL; 23 47 m->invalid_format=1; 24 48 … … 437 461 char *owl_message_get_zwriteline(owl_message *m) 438 462 { 463 if(!m->zwriteline) 464 return ""; 439 465 return(m->zwriteline); 440 466 } … … 442 468 void owl_message_set_zwriteline(owl_message *m, char *line) 443 469 { 470 if(m->zwriteline) owl_free(m->zwriteline); 444 471 m->zwriteline=strdup(line); 445 472 } … … 724 751 struct hostent *hent; 725 752 char *ptr, *tmp, *tmp2; 753 int len; 726 754 727 755 owl_message_init(m); … … 752 780 owl_message_set_opcode(m, ""); 753 781 } 754 owl_message_set_zsig(m, n->z_message);782 owl_message_set_zsig(m, owl_zephyr_get_zsig(n, &len)); 755 783 756 784 if ((ptr=strchr(n->z_recipient, '@'))!=NULL) {
Note: See TracChangeset
for help on using the changeset viewer.