Changeset 5789230 for functions.c
- Timestamp:
- Jun 5, 2003, 2:26:51 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- aac889a
- Parents:
- ae4cd12
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r2824f79 r5789230 1210 1210 { 1211 1211 owl_message *m; 1212 owl_fmtext fm ;1212 owl_fmtext fm, attrfm; 1213 1213 ZNotice_t *n; 1214 1214 char buff[10000], tmpbuff[1024]; … … 1226 1226 } 1227 1227 1228 owl_fmtext_append_normal(&fm, "Msg Id : "); 1228 owl_fmtext_append_bold(&fm, "General Information:\n"); 1229 owl_fmtext_append_normal(&fm, " Msg Id : "); 1229 1230 sprintf(buff, "%i", owl_message_get_id(m)); 1230 1231 owl_fmtext_append_normal(&fm, buff); 1231 1232 owl_fmtext_append_normal(&fm, "\n"); 1232 1233 1233 owl_fmtext_append_normal(&fm, " Type : ");1234 owl_fmtext_append_normal(&fm, " Type : "); 1234 1235 owl_fmtext_append_bold(&fm, owl_message_type_to_string(m)); 1235 1236 owl_fmtext_append_normal(&fm, "\n"); 1236 1237 1237 1238 if (owl_message_is_direction_in(m)) { 1238 owl_fmtext_append_normal(&fm, " Direction : in\n");1239 owl_fmtext_append_normal(&fm, " Direction : in\n"); 1239 1240 } else if (owl_message_is_direction_out(m)) { 1240 owl_fmtext_append_normal(&fm, " Direction : out\n");1241 owl_fmtext_append_normal(&fm, " Direction : out\n"); 1241 1242 } else if (owl_message_is_direction_none(m)) { 1242 owl_fmtext_append_normal(&fm, " Direction : none\n");1243 owl_fmtext_append_normal(&fm, " Direction : none\n"); 1243 1244 } else { 1244 owl_fmtext_append_normal(&fm, " Direction : unknown\n");1245 } 1246 1247 owl_fmtext_append_normal(&fm, " Time : ");1245 owl_fmtext_append_normal(&fm, " Direction : unknown\n"); 1246 } 1247 1248 owl_fmtext_append_normal(&fm, " Time : "); 1248 1249 owl_fmtext_append_normal(&fm, owl_message_get_timestr(m)); 1249 1250 owl_fmtext_append_normal(&fm, "\n"); 1250 1251 1251 1252 if (!owl_message_is_type_admin(m)) { 1252 owl_fmtext_append_normal(&fm, " Sender : ");1253 owl_fmtext_append_normal(&fm, " Sender : "); 1253 1254 owl_fmtext_append_normal(&fm, owl_message_get_sender(m)); 1254 1255 owl_fmtext_append_normal(&fm, "\n"); 1255 1256 1256 owl_fmtext_append_normal(&fm, " Recipient : ");1257 owl_fmtext_append_normal(&fm, " Recipient : "); 1257 1258 owl_fmtext_append_normal(&fm, owl_message_get_recipient(m)); 1258 1259 owl_fmtext_append_normal(&fm, "\n"); … … 1260 1261 1261 1262 if (owl_message_is_type_zephyr(m)) { 1262 owl_fmtext_append_bold(&fm, " Zephyr Specific Info\n");1263 owl_fmtext_append_bold(&fm, "\nZephyr Specific Information:\n"); 1263 1264 1264 owl_fmtext_append_normal(&fm, " Class : ");1265 owl_fmtext_append_normal(&fm, " Class : "); 1265 1266 owl_fmtext_append_normal(&fm, owl_message_get_class(m)); 1266 1267 owl_fmtext_append_normal(&fm, "\n"); 1267 owl_fmtext_append_normal(&fm, " Instance : ");1268 owl_fmtext_append_normal(&fm, " Instance : "); 1268 1269 owl_fmtext_append_normal(&fm, owl_message_get_instance(m)); 1269 1270 owl_fmtext_append_normal(&fm, "\n"); 1270 owl_fmtext_append_normal(&fm, " Opcode : ");1271 owl_fmtext_append_normal(&fm, " Opcode : "); 1271 1272 owl_fmtext_append_normal(&fm, owl_message_get_opcode(m)); 1272 1273 owl_fmtext_append_normal(&fm, "\n"); 1273 1274 1274 owl_fmtext_append_normal(&fm, " Time : ");1275 owl_fmtext_append_normal(&fm, " Time : "); 1275 1276 owl_fmtext_append_normal(&fm, owl_message_get_timestr(m)); 1276 1277 owl_fmtext_append_normal(&fm, "\n"); … … 1279 1280 n=owl_message_get_notice(m); 1280 1281 1281 owl_fmtext_append_normal(&fm, " Kind : ");1282 owl_fmtext_append_normal(&fm, " Kind : "); 1282 1283 if (n->z_kind==UNSAFE) { 1283 1284 owl_fmtext_append_normal(&fm, "UNSAFE\n"); … … 1301 1302 owl_fmtext_append_normal(&fm, "ILLEGAL VALUE\n"); 1302 1303 } 1303 owl_fmtext_append_normal(&fm, " Host : ");1304 owl_fmtext_append_normal(&fm, " Host : "); 1304 1305 owl_fmtext_append_normal(&fm, owl_message_get_hostname(m)); 1305 1306 owl_fmtext_append_normal(&fm, "\n"); 1306 sprintf(buff, " Port : %i\n", n->z_port);1307 sprintf(buff, " Port : %i\n", n->z_port); 1307 1308 owl_fmtext_append_normal(&fm, buff); 1308 1309 1309 owl_fmtext_append_normal(&fm, " Auth : ");1310 owl_fmtext_append_normal(&fm, " Auth : "); 1310 1311 if (n->z_auth == ZAUTH_FAILED) { 1311 1312 owl_fmtext_append_normal(&fm, "FAILED\n"); … … 1319 1320 } 1320 1321 1321 sprintf(buff, "Checkd Ath: %i\n", n->z_checked_auth); 1322 sprintf(buff, "%sMulti notc: %s\n", buff, n->z_multinotice); 1323 sprintf(buff, "%sNum other : %i\n", buff, n->z_num_other_fields); 1324 sprintf(buff, "%sMsg Len : %i\n", buff, n->z_message_len); 1322 /* fix this */ 1323 sprintf(buff, " Checkd Ath: %i\n", n->z_checked_auth); 1324 sprintf(buff, "%s Multi notc: %s\n", buff, n->z_multinotice); 1325 sprintf(buff, "%s Num other : %i\n", buff, n->z_num_other_fields); 1326 sprintf(buff, "%s Msg Len : %i\n", buff, n->z_message_len); 1325 1327 owl_fmtext_append_normal(&fm, buff); 1326 1328 1327 sprintf(buff, " Fields : %i\n", owl_zephyr_get_num_fields(n));1329 sprintf(buff, " Fields : %i\n", owl_zephyr_get_num_fields(n)); 1328 1330 owl_fmtext_append_normal(&fm, buff); 1329 1331 1330 1332 fields=owl_zephyr_get_num_fields(n); 1331 1333 for (i=0; i<fields; i++) { 1332 sprintf(buff, " Field %i : ", i+1);1334 sprintf(buff, " Field %i : ", i+1); 1333 1335 1334 1336 ptr=owl_zephyr_get_field(n, i+1, &len); … … 1352 1354 owl_fmtext_append_normal(&fm, buff); 1353 1355 } 1354 owl_fmtext_append_normal(&fm, " Default Fm:");1356 owl_fmtext_append_normal(&fm, " Default Fm:"); 1355 1357 owl_fmtext_append_normal(&fm, n->z_default_format); 1356 1358 } … … 1358 1360 1359 1361 if (owl_message_is_type_aim(m)) { 1360 owl_fmtext_append_bold(&fm, " AIM Specific Info\n"); 1361 } 1362 owl_fmtext_append_bold(&fm, "\nAIM Specific Information:\n"); 1363 } 1364 1365 owl_fmtext_append_bold(&fm, "\nOwl Message Attributes:\n"); 1366 owl_message_attributes_tofmtext(m, &attrfm); 1367 owl_fmtext_append_fmtext(&fm, &attrfm); 1362 1368 1363 1369 owl_function_popless_fmtext(&fm); 1370 owl_fmtext_free(&fm); 1371 owl_fmtext_free(&attrfm); 1364 1372 } 1365 1373 … … 1751 1759 } 1752 1760 1753 if (owl_message_is_login (m)) {1761 if (owl_message_is_loginout(m)) { 1754 1762 class="MESSAGE"; 1755 1763 inst="PERSONAL"; … … 2359 2367 2360 2368 /* narrow personal and login messages to the sender or recip as appropriate */ 2361 if (owl_message_is_personal(m) || owl_message_is_login (m)) {2369 if (owl_message_is_personal(m) || owl_message_is_loginout(m)) { 2362 2370 if (owl_message_is_type_zephyr(m)) { 2363 2371 if (owl_message_is_direction_in(m)) { … … 2406 2414 /* for now we skip admin messages. */ 2407 2415 if (owl_message_is_type_admin(m) 2408 || owl_message_is_login (m)2416 || owl_message_is_loginout(m) 2409 2417 || !owl_message_is_type_zephyr(m)) { 2410 2418 owl_function_makemsg("smartzpunt doesn't support this message type.");
Note: See TracChangeset
for help on using the changeset viewer.