diff -ur kom++-0.7.post.4/libconnection/connection.cc kom++-0.7.post.4.patched/libconnection/connection.cc --- kom++-0.7.post.4/libconnection/connection.cc Thu Nov 11 16:44:19 1999 +++ kom++-0.7.post.4.patched/libconnection/connection.cc Fri Dec 3 17:16:17 1999 @@ -127,14 +127,8 @@ if (gethostname(hostbuf, MAXHOSTNAMELEN) != 0) hostbuf[0] = '\0'; - if (strchr(hostbuf, '.') != NULL) - domainbuf[0] = '\0'; - else - if (getdomainname(domainbuf, 64) != 0) // FIXME: avoid this - domainbuf[0] = '\0'; - else - if (domainbuf[0] != '.') - dot[0] = '.'; + // Hack. + domainbuf[0] = '\0'; int len = strlen(domainbuf); if (len > 0 && domainbuf[len-1] == '.') @@ -470,6 +464,7 @@ void Connection::register_async(void *vp, void (*new_sinc)(void *, prot_a_LyStr)) { + assert(async_sink == NULL); sync_sink_data = vp; async_sink = new_sinc; } diff -ur kom++-0.7.post.4/libkom++/unread-confs.cc kom++-0.7.post.4.patched/libkom++/unread-confs.cc --- kom++-0.7.post.4/libkom++/unread-confs.cc Sun Nov 14 17:14:16 1999 +++ kom++-0.7.post.4.patched/libkom++/unread-confs.cc Fri Dec 3 17:15:47 1999 @@ -58,7 +58,7 @@ Unread_confs::Unread_confs(Session *sess, Pers_no the_reader) - : session(sess), + : the_session(sess), conferences(sess->conferences()), persons(sess->persons()), maps(sess->maps()), @@ -93,7 +93,7 @@ delete_contents(unread_confs); delete_contents(read_confs); - session->async_dispatcher().unregister_text_created_handler(cr_tag); + the_session->async_dispatcher().unregister_text_created_handler(cr_tag); delete ucq; } @@ -271,7 +271,7 @@ } if (ro == NULL) - ro = new Read_order(session, c, reader); + ro = new Read_order(the_session, c, reader); } change_conference_question q(conferences.connection(), c); @@ -476,7 +476,7 @@ if (ro == NULL) { // Not present in the caches, but the user may still be a member. - if (session->is_member(reader, cno)) + if (the_session->is_member(reader, cno)) ro = add_conference(cno, true); else return KOM_NOT_MEMBER; @@ -543,7 +543,7 @@ Read_order * read_order; - read_order = new Read_order(session, cno, reader); + read_order = new Read_order(the_session, cno, reader); if (last) unread_confs.push_back(read_order); else @@ -571,7 +571,7 @@ || find_if(read_confs.begin(), read_confs.end(), confno_eq(cno)) != read_confs.end()); - Status ret = session->add_member(cno, reader, priority, placement); + Status ret = the_session->add_member(cno, reader, priority, placement); if (ret != st_ok) { @@ -610,7 +610,7 @@ // FIXME: why do the work above if an error occurs? This function // would be simpler if the above code was moved below. - Kom_err ret = session->sub_member(cno, reader); + Kom_err ret = the_session->sub_member(cno, reader); if (ret == KOM_NO_ERROR) { @@ -662,7 +662,7 @@ if (ro == NULL) { - if (session->is_member(reader, cno)) + if (the_session->is_member(reader, cno)) ro = add_conference(cno, true); else return KOM_NOT_MEMBER; @@ -705,13 +705,13 @@ { Conf_no cno = rcpt->recipient(); not_present.push_back(cno); - session->prefetch_is_member(reader, cno); + the_session->prefetch_is_member(reader, cno); } } for (vector::iterator iter = not_present.begin(); iter < not_present.end(); ++iter) - if (session->is_member(reader, *iter)) + if (the_session->is_member(reader, *iter)) add_conference(*iter, true); } diff -ur kom++-0.7.post.4/libkom++/unread-confs.h kom++-0.7.post.4.patched/libkom++/unread-confs.h --- kom++-0.7.post.4/libkom++/unread-confs.h Sun Nov 14 17:12:31 1999 +++ kom++-0.7.post.4.patched/libkom++/unread-confs.h Fri Dec 3 17:17:43 1999 @@ -54,6 +54,10 @@ Unread_confs(const Unread_confs &); ~Unread_confs(); + // Peter: added method + Session * session() const { return the_session; }; + + // This method can be used to require a certain amount of // knowledge about what is unread. Prefetching is done according // to the the criteria in the Work_quota argument. @@ -175,7 +179,7 @@ Status need_one_mapped(); Status need_unread_confs(); - Session * session; + Session * the_session; Conferences & conferences; Persons & persons; Maps & maps; diff -ur kom++-0.7.post.4/Makefile.am kom++-0.7.post.4.patched/Makefile.am --- kom++-0.7.post.4/Makefile.am Sun Nov 14 18:57:23 1999 +++ kom++-0.7.post.4.patched/Makefile.am Mon Jan 17 15:48:05 2000 @@ -18,24 +18,19 @@ # Process this file with automake to generate Makefile.in. -SUBDIRS = libisc libkom++ libconnection other-clients libcompat \ - tcl-clients +SUBDIRS = libisc libkom++ libconnection other-clients libcompat #py-clients #www check-h: for i in $(top_srcdir)/libkom++/*.h \ - $(top_srcdir)/libconnection/*.h $(top_srcdir)/tcl-clients/*.h;\ + $(top_srcdir)/libconnection/*.h \ do \ case $${i} in \ */libconnection/TEMPLATE.h) ;; \ */libkom++/struct-iterator.h) ;; \ */libkom++/sparsemap.h) ;; \ - */tcl-clients/tcl-support.h) ;; \ - */tcl-clients/userio.h) ;; \ - */tcl-clients/cmd-decode.h) ;; \ - */tcl-clients/tcl-glue.h) ;; \ *) \ echo \#include '' > test.cc ; \ echo \#include \"$${i}\" >> test.cc ; \ @@ -49,31 +44,23 @@ rm test.cc echo \#include '' > test.cc for i in $(top_srcdir)/libkom++/*.h \ - $(top_srcdir)/libconnection/*.h $(top_srcdir)/tcl-clients/*.h;\ + $(top_srcdir)/libconnection/*.h \ do \ case $${i} in \ */libconnection/TEMPLATE.h) ;; \ */libkom++/struct-iterator.h) ;; \ */libkom++/sparsemap.h) ;; \ - */tcl-clients/tcl-support.h) ;; \ - */tcl-clients/userio.h) ;; \ - */tcl-clients/cmd-decode.h) ;; \ - */tcl-clients/tcl-glue.h) ;; \ *) \ echo \#include \"$${i}\" >> test.cc ;; \ esac \ done for i in $(top_srcdir)/libkom++/*.h \ - $(top_srcdir)/libconnection/*.h $(top_srcdir)/tcl-clients/*.h;\ + $(top_srcdir)/libconnection/*.h \ do \ case $${i} in \ */libconnection/TEMPLATE.h) ;; \ */libkom++/struct-iterator.h) ;; \ */libkom++/sparsemap.h) ;; \ - */tcl-clients/tcl-support.h) ;; \ - */tcl-clients/userio.h) ;; \ - */tcl-clients/cmd-decode.h) ;; \ - */tcl-clients/tcl-glue.h) ;; \ *) \ echo \#include \"$${i}\" >> test.cc ;; \ esac \ diff -ur kom++-0.7.post.4/Makefile.in kom++-0.7.post.4.patched/Makefile.in --- kom++-0.7.post.4/Makefile.in Sun Nov 14 19:41:53 1999 +++ kom++-0.7.post.4.patched/Makefile.in Mon Jan 17 15:50:02 2000 @@ -92,7 +92,6 @@ PURIFY = @PURIFY@ PYTHON_GLUE = @PYTHON_GLUE@ RANLIB = @RANLIB@ -TCL_CLIENT = @TCL_CLIENT@ TKOM = @TKOM@ U = @U@ USE_MEMCHECK = @USE_MEMCHECK@ @@ -103,9 +102,8 @@ X_LIBS = @X_LIBS@ default_port = @default_port@ default_server = @default_server@ -tcldir = @tcldir@ -SUBDIRS = libisc libkom++ libconnection other-clients libcompat tcl-clients +SUBDIRS = libisc libkom++ libconnection other-clients libcompat ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -391,16 +389,12 @@ check-h: for i in $(top_srcdir)/libkom++/*.h \ - $(top_srcdir)/libconnection/*.h $(top_srcdir)/tcl-clients/*.h;\ + $(top_srcdir)/libconnection/*.h \ do \ case $${i} in \ */libconnection/TEMPLATE.h) ;; \ */libkom++/struct-iterator.h) ;; \ */libkom++/sparsemap.h) ;; \ - */tcl-clients/tcl-support.h) ;; \ - */tcl-clients/userio.h) ;; \ - */tcl-clients/cmd-decode.h) ;; \ - */tcl-clients/tcl-glue.h) ;; \ *) \ echo \#include '' > test.cc ; \ echo \#include \"$${i}\" >> test.cc ; \ @@ -414,31 +408,23 @@ rm test.cc echo \#include '' > test.cc for i in $(top_srcdir)/libkom++/*.h \ - $(top_srcdir)/libconnection/*.h $(top_srcdir)/tcl-clients/*.h;\ + $(top_srcdir)/libconnection/*.h \ do \ case $${i} in \ */libconnection/TEMPLATE.h) ;; \ */libkom++/struct-iterator.h) ;; \ */libkom++/sparsemap.h) ;; \ - */tcl-clients/tcl-support.h) ;; \ - */tcl-clients/userio.h) ;; \ - */tcl-clients/cmd-decode.h) ;; \ - */tcl-clients/tcl-glue.h) ;; \ *) \ echo \#include \"$${i}\" >> test.cc ;; \ esac \ done for i in $(top_srcdir)/libkom++/*.h \ - $(top_srcdir)/libconnection/*.h $(top_srcdir)/tcl-clients/*.h;\ + $(top_srcdir)/libconnection/*.h \ do \ case $${i} in \ */libconnection/TEMPLATE.h) ;; \ */libkom++/struct-iterator.h) ;; \ */libkom++/sparsemap.h) ;; \ - */tcl-clients/tcl-support.h) ;; \ - */tcl-clients/userio.h) ;; \ - */tcl-clients/cmd-decode.h) ;; \ - */tcl-clients/tcl-glue.h) ;; \ *) \ echo \#include \"$${i}\" >> test.cc ;; \ esac \