[787] in BarnOwl Developers
[D-O-H] r791 - in branches/barnowl_unicode: . conf.alexmv/modules conf.alexmv/sql owl
daemon@ATHENA.MIT.EDU (asedeno@MIT.EDU)
Thu Oct 29 18:09:43 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: asedeno@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Mon, 31 Dec 2007 22:38:44 -0500 (EST)
Author: asedeno
Date: 2007-12-31 22:38:43 -0500 (Mon, 31 Dec 2007)
New Revision: 791
Modified:
branches/barnowl_unicode/
branches/barnowl_unicode/conf.alexmv/modules/owlconf-dbi
branches/barnowl_unicode/conf.alexmv/sql/zephyr_log.sql
branches/barnowl_unicode/owl/
branches/barnowl_unicode/owl/commands.c
branches/barnowl_unicode/owl/functions.c
Log:
Merged revisions 785-790 via svnmerge from
file:///afs/sipb.mit.edu/project/barnowl/src/svn/trunk
........
r789 | chmrr | 2007-12-30 20:53:07 -0500 (Sun, 30 Dec 2007) | 5 lines
r1823@utwig: chmrr | 2007-12-30 20:52:12 -0500
* Don't conceal subscription errors with the "ok, we added it to the
.zephyr.subs file" message, by not doing the latter if the former
fails.
........
r790 | chmrr | 2007-12-30 22:54:39 -0500 (Sun, 30 Dec 2007) | 1 line
* Canonicalize class and sender, add base_class
........
Property changes on: branches/barnowl_unicode
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-784
+ /trunk:1-790
Modified: branches/barnowl_unicode/conf.alexmv/modules/owlconf-dbi
===================================================================
--- branches/barnowl_unicode/conf.alexmv/modules/owlconf-dbi 2007-12-31 03:54:39 UTC (rev 790)
+++ branches/barnowl_unicode/conf.alexmv/modules/owlconf-dbi 2008-01-01 03:38:43 UTC (rev 791)
@@ -10,7 +10,7 @@
return if $owl::dbh and $owl::dbh->ping;
$owl::dbh = DBI->connect("DBI:mysql:database=zephyr_log",
"owl", "", {RaiseError => 1});
- $owl::sth = $owl::dbh->prepare("INSERT INTO messages(sender, class, instance, opcode, sent, received, host, zsig, body) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ $owl::sth = $owl::dbh->prepare(q{INSERT INTO messages(sender, class, base_class, instance, opcode, sent, received, host, zsig, body) VALUES (trim(trailing '@ATHENA.MIT.EDU' from ?), ?, trim(leading 'un' from trim(trailing '.d' from ?)), ?, ?, ?, ?, ?, ?, ?)});
}
sub owl::receive_msg {
@@ -19,7 +19,8 @@
my $sent = $owl::strp->parse_datetime($msg->time);
owl::db_connect();
$owl::sth->execute($msg->sender,
- $msg->class,
+ lc $msg->class,
+ lc $msg->class,
$msg->instance,
$msg->opcode ? $msg->opcode : undef,
$sent->datetime,
Modified: branches/barnowl_unicode/conf.alexmv/sql/zephyr_log.sql
===================================================================
--- branches/barnowl_unicode/conf.alexmv/sql/zephyr_log.sql 2007-12-31 03:54:39 UTC (rev 790)
+++ branches/barnowl_unicode/conf.alexmv/sql/zephyr_log.sql 2008-01-01 03:38:43 UTC (rev 791)
@@ -31,6 +31,7 @@
`host` varchar(200) NOT NULL default '',
`zsig` text NOT NULL,
`body` text,
+ `base_class` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `index_class` (`class`),
KEY `index_instance` (`instance`),
@@ -40,8 +41,11 @@
KEY `index_sender` (`sender`),
KEY `index_host` (`host`),
KEY `index_sent` (`sent`),
- FULLTEXT KEY `index_body` (`body`)
-) ENGINE=MyISAM AUTO_INCREMENT=1517065 DEFAULT CHARSET=utf8;
+ KEY `index_base_class` (`base_class`),
+ FULLTEXT KEY `index_body` (`body`),
+ FULLTEXT KEY `index_zsig` (`zsig`),
+ FULLTEXT KEY `index_body_zsig` (`body`,`zsig`)
+) ENGINE=MyISAM AUTO_INCREMENT=2181045 DEFAULT CHARSET=utf8;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
Property changes on: branches/barnowl_unicode/owl
___________________________________________________________________
Name: svk:merge
- 06e3988a-d725-0410-af47-c5dd11e74598:/local/barnowl:1806
8baf6839-b125-0410-9df9-922793c80423:/local/barnowl:20981
8baf6839-b125-0410-9df9-922793c80423:/local/owl:15641
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/branches/par:19594
fe09232e-8620-0410-8e36-e6b4839e121d:/branches/par:688
+ 06e3988a-d725-0410-af47-c5dd11e74598:/local/barnowl:1823
8baf6839-b125-0410-9df9-922793c80423:/local/barnowl:20981
8baf6839-b125-0410-9df9-922793c80423:/local/owl:15641
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/branches/par:19594
fe09232e-8620-0410-8e36-e6b4839e121d:/branches/par:688
Modified: branches/barnowl_unicode/owl/commands.c
===================================================================
--- branches/barnowl_unicode/owl/commands.c 2007-12-31 03:54:39 UTC (rev 790)
+++ branches/barnowl_unicode/owl/commands.c 2008-01-01 03:38:43 UTC (rev 791)
@@ -1767,6 +1767,7 @@
{
char *recip="";
int temp=0;
+ int ret=0;
if (argc<3) {
owl_function_makemsg("Not enough arguments to the subscribe command");
@@ -1796,8 +1797,8 @@
recip=argv[2];
}
- owl_function_subscribe(argv[0], argv[1], recip);
- if (!temp) {
+ ret = owl_function_subscribe(argv[0], argv[1], recip);
+ if (!temp && !ret) {
owl_zephyr_addsub(NULL, argv[0], argv[1], recip);
}
return(NULL);
Modified: branches/barnowl_unicode/owl/functions.c
===================================================================
--- branches/barnowl_unicode/owl/functions.c 2007-12-31 03:54:39 UTC (rev 790)
+++ branches/barnowl_unicode/owl/functions.c 2008-01-01 03:38:43 UTC (rev 791)
@@ -1337,7 +1337,7 @@
}
}
-void owl_function_subscribe(char *class, char *inst, char *recip)
+int owl_function_subscribe(char *class, char *inst, char *recip)
{
int ret;
@@ -1347,6 +1347,7 @@
} else {
owl_function_makemsg("Subscribed.");
}
+ return(ret);
}
void owl_function_unsubscribe(char *class, char *inst, char *recip)