Legend:
- Unmodified
- Added
- Removed
-
zephyr.c
rfe3b017 re778351 1019 1019 { 1020 1020 #ifdef HAVE_LIBZEPHYR 1021 char *exposure, *eset;1022 1021 Code_t ret; 1023 1022 1024 1023 ZResetAuthentication(); 1025 1024 1026 eset = EXPOSE_REALMVIS; 1027 exposure = ZGetVariable(zstr("exposure")); 1028 if (exposure) 1029 exposure = ZParseExposureLevel(exposure); 1030 if (exposure) 1031 eset = exposure; 1032 1033 ret = ZSetLocation(eset); 1025 ret = ZSetLocation(zstr(owl_global_get_exposure(&g))); 1026 1034 1027 if (ret != ZERR_NONE) 1035 1028 owl_function_error("Error setting location: %s", error_message(ret)); … … 1153 1146 #ifdef HAVE_LIBZEPHYR 1154 1147 ZInitLocationInfo(zstr(host), zstr(val)); 1148 #endif 1149 } 1150 1151 int owl_zephyr_set_exposure(const char *exposure) 1152 { 1153 #ifdef HAVE_LIBZEPHYR 1154 Code_t ret; 1155 if (exposure == NULL) 1156 return -1; 1157 exposure = ZParseExposureLevel(zstr(exposure)); 1158 if (exposure == NULL) 1159 return -1; 1160 ret = ZSetLocation(zstr(exposure)); 1161 if (ret != ZERR_NONE) { 1162 owl_function_debugmsg("Unable to set exposure location to %s (%s)", exposure, error_message(ret)); 1163 return -1; /* I don't like this. We should return -1, because we failed, 1164 * but the user gets a message that implies that the value they 1165 * gave is wrong. 1166 */ 1167 } 1168 ret = ZSetVariable(zstr("exposure"), zstr(exposure)); 1169 if (ret != ZERR_NONE) { 1170 owl_function_debugmsg("Unable to set exposure variable to %s (%s)", exposure, error_message(ret)); 1171 return -1; /* ditto the above comment */ 1172 } 1173 #endif 1174 return 0; 1175 } 1176 1177 const char *owl_zephyr_get_exposure(void) 1178 { 1179 #ifdef HAVE_LIBZEPHYR 1180 const char *exposure = ZParseExposureLevel(ZGetVariable(zstr("exposure"))); 1181 if (exposure == NULL) 1182 exposure = EXPOSE_REALMVIS; 1183 return exposure; 1184 #else 1185 return ""; 1155 1186 #endif 1156 1187 }
Note: See TracChangeset
for help on using the changeset viewer.