Changeset 712caac
- Timestamp:
- Aug 15, 2009, 7:08:17 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- c529ac8
- Parents:
- defe4a3
- git-author:
- Anders Kaseorg <andersk@mit.edu> (08/04/09 02:00:22)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:17)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
rfea7992 r712caac 3126 3126 for (i=0; i<j; i++) { 3127 3127 user=owl_list_get_element(&anyone, i); 3128 ret=ZLocateUser( user, &numlocs, ZAUTH);3128 ret=ZLocateUser(zstr(user), &numlocs, ZAUTH); 3129 3129 3130 3130 owl_function_mask_sigint(NULL); … … 3480 3480 for (i=0; i<j; i++) { 3481 3481 user=owl_list_get_element(&anyone, i); 3482 ret=ZLocateUser( user, &numlocs, ZAUTH);3482 ret=ZLocateUser(zstr(user), &numlocs, ZAUTH); 3483 3483 if (ret!=ZERR_NONE) { 3484 3484 owl_function_error("Error getting location for %s", user); -
owl.h
r41c9a96 r712caac 193 193 194 194 #define LINE 2048 195 196 #ifdef HAVE_LIBZEPHYR 197 /* libzephyr doesn't use const, so we appease the type system with this cast. */ 198 static inline char *zstr(const char *str) 199 { 200 return (char *)str; 201 } 202 #endif 195 203 196 204 typedef struct _owl_variable { -
perlconfig.c
rf12d199 r712caac 179 179 n->z_auth = ZAUTH_NO; 180 180 n->z_checked_auth = 0; 181 n->z_class = owl_message_get_class(m);182 n->z_class_inst = owl_message_get_instance(m);183 n->z_opcode = owl_message_get_opcode(m);184 n->z_sender = owl_message_get_sender(m);185 n->z_recipient = owl_message_get_recipient(m);186 n->z_default_format = "[zephyr created from perl]";187 n->z_multinotice = "[zephyr created from perl]";181 n->z_class = zstr(owl_message_get_class(m)); 182 n->z_class_inst = zstr(owl_message_get_instance(m)); 183 n->z_opcode = zstr(owl_message_get_opcode(m)); 184 n->z_sender = zstr(owl_message_get_sender(m)); 185 n->z_recipient = zstr(owl_message_get_recipient(m)); 186 n->z_default_format = zstr("[zephyr created from perl]"); 187 n->z_multinotice = zstr("[zephyr created from perl]"); 188 188 n->z_num_other_fields = 0; 189 189 n->z_message = owl_sprintf("%s%c%s", owl_message_get_zsig(m), '\0', owl_message_get_body(m)); -
zephyr.c
rfea7992 r712caac 54 54 req.z_kind = STAT; 55 55 req.z_port = 0; 56 req.z_class = HM_STAT_CLASS;57 req.z_class_inst = HM_STAT_CLIENT;58 req.z_opcode = HM_GIMMESTATS;59 req.z_sender = "";60 req.z_recipient = "";61 req.z_default_format = "";56 req.z_class = zstr(HM_STAT_CLASS); 57 req.z_class_inst = zstr(HM_STAT_CLIENT); 58 req.z_opcode = zstr(HM_GIMMESTATS); 59 req.z_sender = zstr(""); 60 req.z_recipient = zstr(""); 61 req.z_default_format = zstr(""); 62 62 req.z_message_len = 0; 63 63 … … 427 427 ZSubscription_t subs[5]; 428 428 429 subs[0].zsub_class= class;430 subs[0].zsub_classinst= inst;431 subs[0].zsub_recipient= recip;429 subs[0].zsub_class=zstr(class); 430 subs[0].zsub_classinst=zstr(inst); 431 subs[0].zsub_recipient=zstr(recip); 432 432 433 433 ZResetAuthentication(); … … 448 448 ZSubscription_t subs[5]; 449 449 450 subs[0].zsub_class= class;451 subs[0].zsub_classinst= inst;452 subs[0].zsub_recipient= recip;450 subs[0].zsub_class=zstr(class); 451 subs[0].zsub_classinst=zstr(inst); 452 subs[0].zsub_recipient=zstr(recip); 453 453 454 454 ZResetAuthentication(); … … 676 676 notice.z_kind=ACKED; 677 677 notice.z_port=0; 678 notice.z_class= class;679 notice.z_class_inst= instance;678 notice.z_class=zstr(class); 679 notice.z_class_inst=zstr(instance); 680 680 notice.z_sender=NULL; 681 681 if (!strcmp(recipient, "*") || !strcmp(recipient, "@")) { 682 notice.z_recipient= "";682 notice.z_recipient=zstr(""); 683 683 if (*owl_global_get_zsender(&g)) 684 notice.z_sender= owl_global_get_zsender(&g);684 notice.z_sender=zstr(owl_global_get_zsender(&g)); 685 685 } else { 686 notice.z_recipient= recipient;687 } 688 notice.z_default_format= "Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\nFrom: @bold{$1 <$sender>}\n\n$2";689 if (opcode) notice.z_opcode= opcode;686 notice.z_recipient=zstr(recipient); 687 } 688 notice.z_default_format=zstr("Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\nFrom: @bold{$1 <$sender>}\n\n$2"); 689 if (opcode) notice.z_opcode=zstr(opcode); 690 690 691 691 notice.z_message_len=strlen(zsig)+1+strlen(message); … … 895 895 strcpy(out, ""); 896 896 ZResetAuthentication(); 897 ret=ZLocateUser( user,&numlocs,auth?ZAUTH:ZNOAUTH);897 ret=ZLocateUser(zstr(user),&numlocs,auth?ZAUTH:ZNOAUTH); 898 898 if (ret != ZERR_NONE) { 899 899 sprintf(out, "Error locating user %s\n", user); … … 1004 1004 1005 1005 eset=EXPOSE_REALMVIS; 1006 exposure=ZGetVariable( "exposure");1006 exposure=ZGetVariable(zstr("exposure")); 1007 1007 if (exposure==NULL) { 1008 1008 eset=EXPOSE_REALMVIS; … … 1021 1021 } 1022 1022 1023 ret=ZSetLocation( eset);1023 ret=ZSetLocation(zstr(eset)); 1024 1024 if (ret != ZERR_NONE) { 1025 1025 /* … … 1159 1159 { 1160 1160 #ifdef HAVE_LIBZEPHYR 1161 return(ZGetVariable( var));1161 return(ZGetVariable(zstr(var))); 1162 1162 #else 1163 1163 return(""); … … 1168 1168 { 1169 1169 #ifdef HAVE_LIBZEPHYR 1170 ZInitLocationInfo( host, val);1170 ZInitLocationInfo(zstr(host), zstr(val)); 1171 1171 #endif 1172 1172 }
Note: See TracChangeset
for help on using the changeset viewer.