[Pkg-silc-commits] r111 - in /silc-client/branches/upstream/current: ./ apps/ apps/irssi/ apps/irssi/docs/ apps/irssi/docs/help/ apps/irssi/docs/help/in/ apps/irssi/scripts/ apps/irssi/scripts/examples/ apps/irssi/src/ apps/irssi/src/core/ apps/irssi/src/fe-common/ apps/irssi/src/fe-common/core/ apps/irssi/src/fe-common/silc/ apps/irssi/src/fe-text/ apps/irssi/src/lib-config/ apps/irssi/src/lib-popt/ apps/irssi/src/perl/ apps/irssi/src/silc/ apps/irssi/src/silc/core/ doc/ includes/ lib/ lib/contrib/ lib/silcapputil/ lib/silcasn1/ lib/silcclient/ lib/silcclient/tests/ lib/silccore/ lib/silccrypt/ lib/silcmath/ lib/silcsftp/ lib/silcske/ lib/silcskr/ lib/silcutil/ lib/silcutil/unix/ lib/silcutil/win32/ lib/silcvcard/

lunar at users.alioth.debian.org lunar at users.alioth.debian.org
Fri Jun 29 13:50:16 UTC 2007


Author: lunar
Date: Fri Jun 29 13:50:15 2007
New Revision: 111

URL: http://svn.debian.org/wsvn/pkg-silc/?sc=1&rev=111
Log:
[svn-upgrade] Integrating new upstream version, silc-client (1.1.1)

Modified:
    silc-client/branches/upstream/current/CHANGES
    silc-client/branches/upstream/current/Makefile.am
    silc-client/branches/upstream/current/Makefile.in
    silc-client/branches/upstream/current/README.PLUGIN
    silc-client/branches/upstream/current/TODO
    silc-client/branches/upstream/current/apps/Makefile.am
    silc-client/branches/upstream/current/apps/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/Makefile.am
    silc-client/branches/upstream/current/apps/irssi/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/configure
    silc-client/branches/upstream/current/apps/irssi/configure.in
    silc-client/branches/upstream/current/apps/irssi/docs/Makefile.am
    silc-client/branches/upstream/current/apps/irssi/docs/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/docs/help/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/docs/help/in/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/irssi-version.h.in
    silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.am
    silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.am
    silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/silc-client.spec
    silc-client/branches/upstream/current/apps/irssi/src/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.am
    silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/core/modules-load.c
    silc-client/branches/upstream/current/apps/irssi/src/fe-common/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/fe-common/core/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.am
    silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/fe-silc-messages.c
    silc-client/branches/upstream/current/apps/irssi/src/fe-text/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/lib-config/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/lib-popt/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.am
    silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/silc/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.am
    silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.in
    silc-client/branches/upstream/current/apps/irssi/src/silc/core/client_ops.c
    silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-core.c
    silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-servers.c
    silc-client/branches/upstream/current/configure
    silc-client/branches/upstream/current/configure.ac
    silc-client/branches/upstream/current/doc/Makefile.am
    silc-client/branches/upstream/current/doc/Makefile.in
    silc-client/branches/upstream/current/includes/Makefile.am
    silc-client/branches/upstream/current/includes/Makefile.in
    silc-client/branches/upstream/current/includes/silcdistdefs.h
    silc-client/branches/upstream/current/includes/silcversion.h.in
    silc-client/branches/upstream/current/lib/Makefile.am
    silc-client/branches/upstream/current/lib/Makefile.in
    silc-client/branches/upstream/current/lib/contrib/Makefile.am
    silc-client/branches/upstream/current/lib/contrib/Makefile.in
    silc-client/branches/upstream/current/lib/silcapputil/Makefile.am
    silc-client/branches/upstream/current/lib/silcapputil/Makefile.in
    silc-client/branches/upstream/current/lib/silcapputil/silcapputil.c
    silc-client/branches/upstream/current/lib/silcasn1/Makefile.am
    silc-client/branches/upstream/current/lib/silcasn1/Makefile.in
    silc-client/branches/upstream/current/lib/silcasn1/silcasn1_decode.c
    silc-client/branches/upstream/current/lib/silcasn1/silcasn1_encode.c
    silc-client/branches/upstream/current/lib/silcclient/Makefile.am
    silc-client/branches/upstream/current/lib/silcclient/Makefile.in
    silc-client/branches/upstream/current/lib/silcclient/client_entry.c
    silc-client/branches/upstream/current/lib/silcclient/command.c
    silc-client/branches/upstream/current/lib/silcclient/command_reply.c
    silc-client/branches/upstream/current/lib/silcclient/silcclient.h
    silc-client/branches/upstream/current/lib/silcclient/silcclient_entry.h
    silc-client/branches/upstream/current/lib/silcclient/tests/Makefile.in
    silc-client/branches/upstream/current/lib/silccore/Makefile.am
    silc-client/branches/upstream/current/lib/silccore/Makefile.in
    silc-client/branches/upstream/current/lib/silccore/silcpacket.c
    silc-client/branches/upstream/current/lib/silccore/silcpacket.h
    silc-client/branches/upstream/current/lib/silccrypt/Makefile.am
    silc-client/branches/upstream/current/lib/silccrypt/Makefile.in
    silc-client/branches/upstream/current/lib/silcmath/Makefile.am
    silc-client/branches/upstream/current/lib/silcmath/Makefile.in
    silc-client/branches/upstream/current/lib/silcsftp/Makefile.am
    silc-client/branches/upstream/current/lib/silcsftp/Makefile.in
    silc-client/branches/upstream/current/lib/silcsftp/sftp_client.c
    silc-client/branches/upstream/current/lib/silcsftp/sftp_fs_memory.c
    silc-client/branches/upstream/current/lib/silcske/Makefile.am
    silc-client/branches/upstream/current/lib/silcske/Makefile.in
    silc-client/branches/upstream/current/lib/silcske/silcconnauth.c
    silc-client/branches/upstream/current/lib/silcske/silcske.c
    silc-client/branches/upstream/current/lib/silcskr/Makefile.am
    silc-client/branches/upstream/current/lib/silcskr/Makefile.in
    silc-client/branches/upstream/current/lib/silcskr/silcskr.c
    silc-client/branches/upstream/current/lib/silcutil/Makefile.am
    silc-client/branches/upstream/current/lib/silcutil/Makefile.in
    silc-client/branches/upstream/current/lib/silcutil/silcatomic.h
    silc-client/branches/upstream/current/lib/silcutil/silcbuffer.h
    silc-client/branches/upstream/current/lib/silcutil/silcbuffmt.c
    silc-client/branches/upstream/current/lib/silcutil/silcdlist.h
    silc-client/branches/upstream/current/lib/silcutil/silcfsm.c
    silc-client/branches/upstream/current/lib/silcutil/silclog.c
    silc-client/branches/upstream/current/lib/silcutil/silcmime.c
    silc-client/branches/upstream/current/lib/silcutil/silcmutex.h
    silc-client/branches/upstream/current/lib/silcutil/silcnet.h
    silc-client/branches/upstream/current/lib/silcutil/silcschedule.c
    silc-client/branches/upstream/current/lib/silcutil/silcschedule.h
    silc-client/branches/upstream/current/lib/silcutil/silcschedule_i.h
    silc-client/branches/upstream/current/lib/silcutil/silcstack.h
    silc-client/branches/upstream/current/lib/silcutil/unix/Makefile.in
    silc-client/branches/upstream/current/lib/silcutil/unix/silcunixnet.c
    silc-client/branches/upstream/current/lib/silcutil/unix/silcunixschedule.c
    silc-client/branches/upstream/current/lib/silcutil/unix/silcunixthread.c
    silc-client/branches/upstream/current/lib/silcutil/win32/Makefile.in
    silc-client/branches/upstream/current/lib/silcvcard/Makefile.am
    silc-client/branches/upstream/current/lib/silcvcard/Makefile.in

Modified: silc-client/branches/upstream/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/CHANGES?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/CHANGES (original)
+++ silc-client/branches/upstream/current/CHANGES Fri Jun 29 13:50:15 2007
@@ -1,3 +1,159 @@
+Thu Jun 28 19:19:13 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* SILC Client 1.1.1.
+
+Sun Jun 24 18:47:55 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* SILC Toolkit 1.1.1.
+
+	* Compile sources with _GNU_SOURCE on Linux systems.  Affected
+	  file is configure.ad.
+
+Sun Jun 24 16:33:59 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Fixed Unix signal task dispatching to not lock the signals
+	  when dispatching the callback to avoid deadlocks.  Affected
+	  file is lib/silcutil/unix/silcunixschedule.c.
+
+Sun Jun 24 14:43:21 CEST 2007  Jochen Eisinger <coffee at silcnet.org>
+
+	* Fix configure output for with-plugin.  Affected file is
+	  apps/irssi/configure.ad
+
+Tue Jun 19 17:05:48 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Added SILC_VERSION macro for checking package versions at
+	  compile time.  Affected files are configure.ad,
+	  includes/silc.h.in and includes/silcversion.h.in.
+
+Mon Jun 18 23:47:22 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Use SILC_VERIFY to assert that silc_rwlock_wrlock can be
+	  called only once per thread on Unix.  Affected file is
+	  lib/silcutil/unix/silcunixthread.c.  Added same for mutex
+	  as well.   Documented same on the API in 
+	  lib/silcutil/silcmutex.h.
+
+	* Fixed USERS command reply write-lock unlocking.  Affected file
+	  is lib/silcclient/command_reply.c.
+
+Mon Jun 18 08:14:26 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Fixed silc_create_key_pair to check for valid identifier.
+	  Affected file is lib/silcapputil/silcapputil.c.
+
+Sun Jun 17 20:08:26 CEST 2007  Jochen Eisinger <coffee at silcnet.org>
+
+	* Rewrite signed public message handling, adopting the new
+	  hilight interface.  Affected file is
+	  apps/irssi/src/fe-common/silc/fe-silc-messages.c
+
+Thu Jun 14 21:15:31 CEST 2007  Jochen Eisinger <coffee at silcnet.org>
+
+	* Fix off by one error when loading modules.  Affected file is
+	  apps/irssi/src/core/modules-load.c
+
+	* Don't delete hilight entry (because it's just a pointer, not a
+	  copy).  Affected file is 
+	  apps/irssi/src/fe-common/silc/fe-silc-messages.c
+
+Mon Jun 11 22:10:17 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Added __SILC_TOOLKIT_x_x_x macro to all Toolkit distribution
+	  which can be used to check for Toolkit version in third-party
+	  software.  Affected file is configure.ad, includes/silc.h.in.
+
+Sun Jun 10 17:32:15 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Added support for channel at server channel name strings to
+	  client library (SILC protocol version 1.3 change).  Affected
+	  files are lib/silcclient/silcclient_entry.h, client_entry.c.
+
+	* Added full_nicknames and full_channel_names settings to
+	  SilcClientParams that can be used to specify whether client
+	  library returns full nickname and channel name strings.
+	  Full strings are nick at server and channel at server.  Affected
+	  file is lib/silcclient/client_entry.c and command.c.
+
+Sat Jun  9 19:43:25 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Fixed unix connecting failure to return error code correctly.
+	  Affected file is lib/silcutil/unix/silcunixnet.c.
+
+Fri Jun  8 23:32:33 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Fixed SKE timeout double free crash.  Affected file is
+	  lib/silcske/silcske.c.
+
+	* Fixed MIME multipart decoding buffer overflow.  Affected file
+	  is lib/silcutil/silcmime.c.  Thanks to Matt Miller for patch.
+
+Fri Jun  8 18:39:34 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Fixed connection auth protocol timeout crash.  Affected
+	  file is lib/silcske/silconnauth.c.
+
+	* Fixed FSM machine finishing to check for existing threads
+	  at the final free callback to allow time for the threads to
+	  finish.  Affected file lib/silcutil/silcfsm.c.
+
+Thu Jun  7 21:25:31 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Fixed silc_client_get_clients_local to check the nick's
+	  server also if nick at server nickname string is given to the
+	  function.  Affected file is lib/silcclient/client_entry.c.
+
+Wed Jun  6 18:33:05 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Added notify callback to silc_schedule_init which can be used to 
+	  set a notify callback for scheduler which is called when task is
+	  added to scheduler or deleted from scheduler.  Affected file
+	  is lib/silcutil/silcschedule.[ch].
+
+	* Dispatch timeout tasks after dispatching FD tasks if the timeout
+	  was very short.  Affected file is lib/silcutil/silcschedule.c.
+
+	* Rewrote the SILC scheduler handling in SILC Client to not poll
+	  every few msecs but to use the new notify callback.  Affected 
+	  file is apps/irssi/src/silc/core/silc-core.c.
+
+	* Fixed SFTP client library read buffer size which was too small.
+	  Affected file is lib/silcsftp/sftp_client.c.
+
+	* Fixed file transfer crash bug in /QUIT in SILC Client.  Close
+	  the FTP sessions before quitting the client.  Affected file
+	  is apps/irssi/src/silc/core/silc-servers.c.
+
+Tue Jun  5 20:48:40 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Fixed silc_packet_get_ids to decode the IDs correctly.
+	  Affected file is lib/silccore/silcpacket.c.
+
+	* Fixed silc_client_get_clients_local to parse correctly nickname
+	  string that may have server name in it (nick at server) regardless
+	  whether it was formatted nickname or not.  Affected file is
+	  lib/silcclient/client_entry.c.
+
+Mon Jun  4 22:02:53 CEST 2007  Jochen Eisinger <jochen at penguin-breeder.org>
+
+	* Only destroy sendbuffers, if they still exist (they cease to
+	  exist during /upgrade).  Affected file is
+	  apps/irssi/src/silc/core/silc-servers.c
+
+Mon Jun  4 21:24:17 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* Removed --enable-silc-plugin.  Added --with-silc-plugin.
+	  Affected files are configure.ad, lib/configure.ad,
+	  apps/irssi/configure.ad, apps/irssi/configure.in,
+	  apps/irssi/scripts/Makefile.am,
+	  apps/irssi/scripts/examples/Makefile.am,
+	  apps/irssi/src/silc/core/silc/Makefile.am,
+	  apps/irssi/src/fe-common/silc/Makefile.am.
+
+Mon Jun  4 08:35:59 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
+
+	* SILC Client 1.1.
+
 Sun Jun  3 14:00:09 EEST 2007  Pekka Riikonen <priikone at silcnet.org>
 
 	* Fixed DESTDIR handling in make install.

Modified: silc-client/branches/upstream/current/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/Makefile.am (original)
+++ silc-client/branches/upstream/current/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./Makefile.ad file in the source tree.
 
 # Source: ./Makefile.ad
-# Generated: Mon Jun  4 08:18:54 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:48 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/Makefile.in (original)
+++ silc-client/branches/upstream/current/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./Makefile.ad file in the source tree.
 
 # Source: ./Makefile.ad
-# Generated: Mon Jun  4 08:18:54 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:48 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -235,6 +235,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/README.PLUGIN
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/README.PLUGIN?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/README.PLUGIN (original)
+++ silc-client/branches/upstream/current/README.PLUGIN Fri Jun 29 13:50:15 2007
@@ -1,14 +1,18 @@
 In order to compile the SILC Plugin (instead of the SILC Client), pass the
-following options to configure:
+following options to configure, if your Irssi is installed into /usr:
 
-	--enable-silc-plugin --without-silc-includes
+	--prefix=/usr
+	--with-silc-plugin
+	--without-silc-includes
 
-Depending on your OS/architecture you may also need to pass:
+If your Irssi is installed in some other location than /usr, then pass its
+location to --prefix and --with-silc-plugin, for example:
+
+	--prefix=/usr/local
+	--with-silc-plugin=/usr/local/lib/irssi
+	--without-silc-includes
+
+Depending on your OS/architecture you may also need to pass the following
+options to configure:
 
 	--with-pic --without-pthreads
-
-For installing the SILC Plugin to the appropriate directories, you have to
-define the following paths (assuming Irssi is installed to /usr)
-
-	--prefix=/usr
-	--with-simdir=/usr/lib/irssi

Modified: silc-client/branches/upstream/current/TODO
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/TODO?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/TODO (original)
+++ silc-client/branches/upstream/current/TODO Fri Jun 29 13:50:15 2007
@@ -10,6 +10,11 @@
 ===========================
 
  o Port all code to use SILC Toolkit 1.1 APIs.
+
+ o Dynamic connection support for INFO and MOTD commands.
+
+ o Dynamic connection support for JOIN command.  Accept channel name
+   strings of format channel at server.
 
  o Fix/test GETKEY.
 

Modified: silc-client/branches/upstream/current/apps/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/Makefile.am (original)
+++ silc-client/branches/upstream/current/apps/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./apps/Makefile.ad file in the source tree.
 
 # Source: ./apps/Makefile.ad
-# Generated: Mon Jun  4 08:18:52 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/apps/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./apps/Makefile.ad file in the source tree.
 
 # Source: ./apps/Makefile.ad
-# Generated: Mon Jun  4 08:18:52 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -177,6 +177,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/apps/irssi/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/Makefile.am (original)
+++ silc-client/branches/upstream/current/apps/irssi/Makefile.am Fri Jun 29 13:50:15 2007
@@ -23,10 +23,11 @@
 
 if SILCPLUGIN
 themedir = $(datadir)/irssi/themes
+theme_DATA = plugin.theme
 else
 themedir = $(datadir)/silc/themes
+theme_DATA = default.theme plugin.theme
 endif
-theme_DATA = default.theme plugin.theme
 
 noinst_HEADERS = irssi-version.h.in
 

Modified: silc-client/branches/upstream/current/apps/irssi/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/Makefile.in Fri Jun 29 13:50:15 2007
@@ -212,6 +212,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@
@@ -292,7 +293,8 @@
 conffile = silc.conf
 @SILCPLUGIN_FALSE at themedir = $(datadir)/silc/themes
 @SILCPLUGIN_TRUE at themedir = $(datadir)/irssi/themes
-theme_DATA = default.theme plugin.theme
+ at SILCPLUGIN_FALSE@theme_DATA = default.theme plugin.theme
+ at SILCPLUGIN_TRUE@theme_DATA = plugin.theme
 noinst_HEADERS = irssi-version.h.in
 EXTRA_DIST = \
 	autogen.sh \

Modified: silc-client/branches/upstream/current/apps/irssi/configure
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/configure?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/configure (original)
+++ silc-client/branches/upstream/current/apps/irssi/configure Fri Jun 29 13:50:15 2007
@@ -877,6 +877,7 @@
 perlpath
 SILCPLUGIN_TRUE
 SILCPLUGIN_FALSE
+SILC_IRSSIDIR
 GLIB_CFLAGS
 GLIB_LIBS
 GLIB_CONFIG
@@ -1535,7 +1536,6 @@
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
-  --enable-silc-plugin    Compile the SILC Plugin instead of the SILC Client
   --enable-ipv6           Enable IPv6 support
   --disable-glibtest       Do not try to compile and run a test GLIB program
   --disable-glibtest      do not try to compile and run a test GLIB program
@@ -1562,6 +1562,8 @@
   --with-perl=yes|no|module  Build with Perl support - also specifies
                         if it should be built into main irssi binary
                         (static, default) or as module
+  --with-silc-plugin[=DIR] Compile the SILC Plugin for Irssi, specify
+                           Irssi location [/usr/lib/irssi]
   --with-file-offset-size=BITS  Set size of file offsets. Usually 32 or 64.
                           (default: 64 if available)
   --with-glib-prefix=PFX   Prefix where GLIB is installed (optional)
@@ -5693,7 +5695,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5696 "configure"' > conftest.$ac_ext
+  echo '#line 5698 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8019,11 +8021,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8022: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8024: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8026: \$? = $ac_status" >&5
+   echo "$as_me:8028: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8287,11 +8289,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8290: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8292: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8294: \$? = $ac_status" >&5
+   echo "$as_me:8296: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8391,11 +8393,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8394: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8396: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8398: \$? = $ac_status" >&5
+   echo "$as_me:8400: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9856,7 +9858,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 9859 "configure"' > conftest.$ac_ext
+    echo '#line 9861 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -10720,7 +10722,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10723 "configure"
+#line 10725 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10820,7 +10822,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10823 "configure"
+#line 10825 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13159,11 +13161,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13162: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13164: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13166: \$? = $ac_status" >&5
+   echo "$as_me:13168: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13263,11 +13265,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13266: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13268: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13270: \$? = $ac_status" >&5
+   echo "$as_me:13272: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13799,7 +13801,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 13802 "configure"' > conftest.$ac_ext
+    echo '#line 13804 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14857,11 +14859,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14860: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14862: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14864: \$? = $ac_status" >&5
+   echo "$as_me:14866: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14961,11 +14963,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14964: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14966: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14968: \$? = $ac_status" >&5
+   echo "$as_me:14970: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16406,7 +16408,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 16409 "configure"' > conftest.$ac_ext
+    echo '#line 16411 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -17183,11 +17185,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17186: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17188: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17190: \$? = $ac_status" >&5
+   echo "$as_me:17192: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17451,11 +17453,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17454: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17456: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17458: \$? = $ac_status" >&5
+   echo "$as_me:17460: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17555,11 +17557,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17558: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17560: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17562: \$? = $ac_status" >&5
+   echo "$as_me:17564: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -19020,7 +19022,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 19023 "configure"' > conftest.$ac_ext
+    echo '#line 19025 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -20832,18 +20834,36 @@
 
 # Irssi SILC Plugin support
 #
-# Check whether --enable-silc-plugin was given.
-if test "${enable_silc_plugin+set}" = set; then
-  enableval=$enable_silc_plugin; case "${enableval}" in
-  yes) silc_plugin=true ;;
-  no)  silc_plugin=false ;;
-  *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-silc-plugin" >&5
-echo "$as_me: error: bad value ${enableval} for --enable-silc-plugin" >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
-else
-  silc_plugin=false
-fi
+SILC_IRSSIDIR=
+silc_plugin=false
+{ echo "$as_me:$LINENO: checking whether to compile SILC Plugin for Irssi" >&5
+echo $ECHO_N "checking whether to compile SILC Plugin for Irssi... $ECHO_C" >&6; }
+
+# Check whether --with-silc-plugin was given.
+if test "${with_silc_plugin+set}" = set; then
+  withval=$with_silc_plugin;
+    case "${withval}" in
+      no)
+        { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+        silc_plugin=false
+        ;;
+      yes)
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+        silc_plugin=true
+	SILC_IRSSIDIR="/usr/lib/irssi/modules"
+       ;;
+      *)
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+        silc_plugin=true
+        SILC_IRSSIDIR="$withval/modules"
+        ;;
+    esac
+
+fi
+
 
  if test x$silc_plugin = xtrue; then
   SILCPLUGIN_TRUE=
@@ -20852,6 +20872,7 @@
   SILCPLUGIN_TRUE='#'
   SILCPLUGIN_FALSE=
 fi
+
 
 
 
@@ -27960,6 +27981,7 @@
 perlpath!$perlpath$ac_delim
 SILCPLUGIN_TRUE!$SILCPLUGIN_TRUE$ac_delim
 SILCPLUGIN_FALSE!$SILCPLUGIN_FALSE$ac_delim
+SILC_IRSSIDIR!$SILC_IRSSIDIR$ac_delim
 GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim
 GLIB_LIBS!$GLIB_LIBS$ac_delim
 GLIB_CONFIG!$GLIB_CONFIG$ac_delim
@@ -28016,7 +28038,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 66; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 67; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: silc-client/branches/upstream/current/apps/irssi/configure.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/configure.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/configure.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/configure.in Fri Jun 29 13:50:15 2007
@@ -191,14 +191,33 @@
 
 # Irssi SILC Plugin support
 #
-AC_ARG_ENABLE(silc-plugin,
-[  --enable-silc-plugin    Compile the SILC Plugin instead of the SILC Client],
-[case "${enableval}" in
-  yes) silc_plugin=true ;;
-  no)  silc_plugin=false ;;
-  *) AC_MSG_ERROR(bad value ${enableval} for --enable-silc-plugin) ;;
-esac],[silc_plugin=false])
+SILC_IRSSIDIR=
+silc_plugin=false
+AC_MSG_CHECKING(whether to compile SILC Plugin for Irssi)
+AC_ARG_WITH(silc-plugin,
+  [[  --with-silc-plugin[=DIR] Compile the SILC Plugin for Irssi, specify
+                           Irssi location [/usr/lib/irssi]]],
+  [
+    case "${withval}" in
+      no)
+        AC_MSG_RESULT(no)
+        silc_plugin=false
+        ;;
+      yes)
+        AC_MSG_RESULT(yes)
+        silc_plugin=true
+	SILC_IRSSIDIR="/usr/lib/irssi/modules"
+       ;;
+      *)
+        AC_MSG_RESULT(yes)
+        silc_plugin=true
+        SILC_IRSSIDIR="$withval/modules"
+        ;;
+    esac
+  ])
+
 AM_CONDITIONAL(SILCPLUGIN, test x$silc_plugin = xtrue)
+AC_SUBST(SILC_IRSSIDIR)
 
 AC_ARG_WITH(file-offset-size,
 [  --with-file-offset-size=BITS  Set size of file offsets. Usually 32 or 64.

Modified: silc-client/branches/upstream/current/apps/irssi/docs/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/docs/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/docs/Makefile.am (original)
+++ silc-client/branches/upstream/current/apps/irssi/docs/Makefile.am Fri Jun 29 13:50:15 2007
@@ -1,4 +1,3 @@
-
 doc_DATA = signals.txt formats.txt manual.txt startup-HOWTO.html \
 	special_vars.txt
 

Modified: silc-client/branches/upstream/current/apps/irssi/docs/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/docs/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/docs/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/docs/Makefile.in Fri Jun 29 13:50:15 2007
@@ -147,6 +147,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/docs/help/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/docs/help/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/docs/help/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/docs/help/Makefile.in Fri Jun 29 13:50:15 2007
@@ -149,6 +149,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/docs/help/in/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/docs/help/in/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/docs/help/in/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/docs/help/in/Makefile.in Fri Jun 29 13:50:15 2007
@@ -127,6 +127,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/irssi-version.h.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/irssi-version.h.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/irssi-version.h.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/irssi-version.h.in Fri Jun 29 13:50:15 2007
@@ -1,4 +1,4 @@
 /* automatically created by autogen.sh */
-#define IRSSI_VERSION "1.1 (Irssi base: @VERSION@ - SILC base: SILC 1.1)"
-#define IRSSI_VERSION_DATE 20070604
-#define IRSSI_VERSION_TIME 20070604
+#define IRSSI_VERSION "1.1.1 (Irssi base: @VERSION@ - SILC base: SILC 1.1.1)"
+#define IRSSI_VERSION_DATE 20070628
+#define IRSSI_VERSION_TIME 20070628

Modified: silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.am (original)
+++ silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.am Fri Jun 29 13:50:15 2007
@@ -1,12 +1,13 @@
 SUBDIRS = examples
+
+PLUGIN_SCR = silc.pl
 
 if SILCPLUGIN
 scriptdir = $(datadir)/irssi/scripts
+IRSSI_SCR =
 else
 scriptdir = $(datadir)/silc/scripts
-endif
-
-script_DATA = \
+IRSSI_SCR = \
 	autoop.pl \
 	autorejoin.pl \
 	buf.pl \
@@ -16,8 +17,12 @@
 	mlock.pl \
 	quitmsg.pl \
 	scriptassist.pl \
-	silc.pl \
 	splitlong.pl \
 	usercount.pl
+endif
+
+script_DATA = \
+        $(PLUGIN_SCR) \
+        $(IRSSI_SCR)
 
 EXTRA_DIST = $(script_DATA)

Modified: silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/scripts/Makefile.in Fri Jun 29 13:50:15 2007
@@ -147,6 +147,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@
@@ -209,21 +210,26 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUBDIRS = examples
+PLUGIN_SCR = silc.pl
 @SILCPLUGIN_FALSE at scriptdir = $(datadir)/silc/scripts
 @SILCPLUGIN_TRUE at scriptdir = $(datadir)/irssi/scripts
+ at SILCPLUGIN_FALSE@IRSSI_SCR = \
+ at SILCPLUGIN_FALSE@	autoop.pl \
+ at SILCPLUGIN_FALSE@	autorejoin.pl \
+ at SILCPLUGIN_FALSE@	buf.pl \
+ at SILCPLUGIN_FALSE@	dns.pl \
+ at SILCPLUGIN_FALSE@	kills.pl \
+ at SILCPLUGIN_FALSE@	mail.pl \
+ at SILCPLUGIN_FALSE@	mlock.pl \
+ at SILCPLUGIN_FALSE@	quitmsg.pl \
+ at SILCPLUGIN_FALSE@	scriptassist.pl \
+ at SILCPLUGIN_FALSE@	splitlong.pl \
+ at SILCPLUGIN_FALSE@	usercount.pl
+
+ at SILCPLUGIN_TRUE@IRSSI_SCR = 
 script_DATA = \
-	autoop.pl \
-	autorejoin.pl \
-	buf.pl \
-	dns.pl \
-	kills.pl \
-	mail.pl \
-	mlock.pl \
-	quitmsg.pl \
-	scriptassist.pl \
-	silc.pl \
-	splitlong.pl \
-	usercount.pl
+        $(PLUGIN_SCR) \
+        $(IRSSI_SCR)
 
 EXTRA_DIST = $(script_DATA)
 all: all-recursive

Modified: silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.am (original)
+++ silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.am Fri Jun 29 13:50:15 2007
@@ -1,13 +1,15 @@
 
 if SILCPLUGIN
 scriptdir = $(datadir)/irssi/scripts
+IRSSI_EX_SCR =
 else
 scriptdir = $(datadir)/silc/scripts
-endif
-
-script_DATA = \
+IRSSI_EX_SCR = \
 	command.pl \
 	msg-event.pl \
 	redirect.pl
+endif
+
+script_DATA = $(IRSSI_EX_SCR)
 
 EXTRA_DIST = $(script_DATA)

Modified: silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/scripts/examples/Makefile.in Fri Jun 29 13:50:15 2007
@@ -135,6 +135,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@
@@ -198,11 +199,13 @@
 top_srcdir = @top_srcdir@
 @SILCPLUGIN_FALSE at scriptdir = $(datadir)/silc/scripts
 @SILCPLUGIN_TRUE at scriptdir = $(datadir)/irssi/scripts
-script_DATA = \
-	command.pl \
-	msg-event.pl \
-	redirect.pl
-
+ at SILCPLUGIN_FALSE@IRSSI_EX_SCR = \
+ at SILCPLUGIN_FALSE@	command.pl \
+ at SILCPLUGIN_FALSE@	msg-event.pl \
+ at SILCPLUGIN_FALSE@	redirect.pl
+
+ at SILCPLUGIN_TRUE@IRSSI_EX_SCR = 
+script_DATA = $(IRSSI_EX_SCR)
 EXTRA_DIST = $(script_DATA)
 all: all-am
 

Modified: silc-client/branches/upstream/current/apps/irssi/silc-client.spec
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/silc-client.spec?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/silc-client.spec (original)
+++ silc-client/branches/upstream/current/apps/irssi/silc-client.spec Fri Jun 29 13:50:15 2007
@@ -1,6 +1,6 @@
 Summary: SILC Client
 Name: silc-client
-Version: 1.1
+Version: 1.1.1
 Release: 0.fc7
 License: GPL
 Group: Applications/Communications

Modified: silc-client/branches/upstream/current/apps/irssi/src/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/Makefile.in Fri Jun 29 13:50:15 2007
@@ -140,6 +140,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.am (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.am Fri Jun 29 13:50:15 2007
@@ -7,7 +7,7 @@
 	-I$(top_srcdir)/src/core \
 	$(GLIB_CFLAGS) \
 	-DSYSCONFDIR=\""$(silc_etcdir)"\" \
-	-DMODULEDIR=\""$(silc_modulesdir)"\"
+	-DMODULEDIR=\""@SILC_IRSSIDIR@"\"
 
 libcore_a_SOURCES = \
 	args.c \

Modified: silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/core/Makefile.in Fri Jun 29 13:50:15 2007
@@ -200,6 +200,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@
@@ -272,7 +273,7 @@
 	-I$(silc_top_srcdir)/doc -I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/core $(GLIB_CFLAGS) \
 	-DSYSCONFDIR=\""$(silc_etcdir)"\" \
-	-DMODULEDIR=\""$(silc_modulesdir)"\"
+	-DMODULEDIR=\""@SILC_IRSSIDIR@"\"
 libcore_a_SOURCES = \
 	args.c \
 	channels.c \

Modified: silc-client/branches/upstream/current/apps/irssi/src/core/modules-load.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/core/modules-load.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/core/modules-load.c (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/core/modules-load.c Fri Jun 29 13:50:15 2007
@@ -97,7 +97,7 @@
 	    strcmp(name+rootlen, "_core") == 0)
                 return g_strdup("core");
 
-	if (namelen+1 > rootlen && name[namelen-rootlen-1] == '_' &&
+	if (namelen > rootlen && name[namelen-rootlen-1] == '_' &&
 	    strcmp(name+namelen-rootlen, root) == 0)
                 return g_strndup(name, namelen-rootlen-1);
 

Modified: silc-client/branches/upstream/current/apps/irssi/src/fe-common/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/fe-common/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/fe-common/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/fe-common/Makefile.in Fri Jun 29 13:50:15 2007
@@ -137,6 +137,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/src/fe-common/core/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/fe-common/core/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/fe-common/core/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/fe-common/core/Makefile.in Fri Jun 29 13:50:15 2007
@@ -199,6 +199,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.am (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.am Fri Jun 29 13:50:15 2007
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.defines.in
 
-moduledir = $(silc_modulesdir)
+moduledir = @SILC_IRSSIDIR@
 
 IRSSI_INCLUDE=../../..
 
@@ -79,5 +79,5 @@
 
 if SILCPLUGIN
 install-data-hook: libfe_common_silc.la
-	-ln -s libfe_common_silc.so $(moduledir)/libfe_silc.so
+	-ln -s libfe_common_silc.so $(DESTDIR)$(moduledir)/libfe_silc.so
 endif

Modified: silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/Makefile.in Fri Jun 29 13:50:15 2007
@@ -199,6 +199,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@
@@ -270,7 +271,7 @@
 	-I$(silc_top_srcdir)/includes \
 	-I$(silc_top_srcdir)/doc
 
-moduledir = $(silc_modulesdir)
+moduledir = @SILC_IRSSIDIR@
 IRSSI_INCLUDE = ../../..
 @SILCPLUGIN_FALSE at EXTRA_CFLAGS = 
 @SILCPLUGIN_TRUE at EXTRA_CFLAGS = -DSILC_PLUGIN
@@ -651,7 +652,7 @@
 	cp .libs/libfe_common_silc.a .
 
 @SILCPLUGIN_TRUE at install-data-hook: libfe_common_silc.la
- at SILCPLUGIN_TRUE@	-ln -s libfe_common_silc.so $(moduledir)/libfe_silc.so
+ at SILCPLUGIN_TRUE@	-ln -s libfe_common_silc.so $(DESTDIR)$(moduledir)/libfe_silc.so
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:

Modified: silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/fe-silc-messages.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/fe-silc-messages.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/fe-silc-messages.c (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/fe-common/silc/fe-silc-messages.c Fri Jun 29 13:50:15 2007
@@ -57,6 +57,7 @@
   const char *nickmode, *printnick;
   int for_me, print_channel, level;
   char *color, *freemsg = NULL;
+  HILIGHT_REC *hilight;
 
   /* NOTE: this may return NULL if some channel is just closed with
      /WINDOW CLOSE and server still sends the few last messages */
@@ -66,9 +67,9 @@
 
   for_me = !settings_get_bool("hilight_nick_matches") ? FALSE :
       nick_match_msg(chanrec, msg, server->nick);
-  color = for_me ? NULL :
-    (char *)hilight_match_nick(server, target, nick, address, MSGLEVEL_PUBLIC,
-			       msg);
+  hilight = for_me ? NULL :
+	  hilight_match_nick(server, target, nick, address, MSGLEVEL_PUBLIC, msg);
+  color = (hilight == NULL) ? NULL : hilight_get_color(hilight);
 
   print_channel = chanrec == NULL ||
       !window_item_is_active((WI_ITEM_REC *) chanrec);
@@ -77,7 +78,7 @@
     print_channel = TRUE;
 
   level = MSGLEVEL_PUBLIC;
-  if (for_me || color != NULL)
+  if (for_me)
     level |= MSGLEVEL_HILIGHT;
 
   if (settings_get_bool("emphasis"))
@@ -91,32 +92,31 @@
   if (printnick == NULL)
     printnick = nick;
 
-  if (!print_channel) {
-    /* message to active channel in window */
-    if (color != NULL) {
-      /* highlighted nick */
-      printformat_module("fe-common/silc", server, target,
-			 level, VERIFIED_MSG(verified, SILCTXT_PUBMSG_HILIGHT),
-			 color, printnick, msg, nickmode);
-    } else {
-      printformat_module("fe-common/silc", server, target, level,
-			 for_me ? VERIFIED_MSG(verified, SILCTXT_PUBMSG_ME) :
-			 	  VERIFIED_MSG(verified,SILCTXT_PUBMSG),
-			 printnick, msg, nickmode);
-    }
-  } else {
-    /* message to not existing/active channel */
-    if (color != NULL) {
-      /* highlighted nick */
-      printformat_module("fe-common/silc", server, target, level,
+  if (color != NULL) {
+    /* highlighted nick */
+    TEXT_DEST_REC dest;
+    format_create_dest(&dest, server, target, level, NULL);
+    hilight_update_text_dest(&dest,hilight);
+    if (!print_channel) /* message to active channel in windpw */
+      printformat_module_dest("fe-common/silc", &dest, 
+      		 VERIFIED_MSG(verified, SILCTXT_PUBMSG_HILIGHT),
+      		 color, printnick, msg, nickmode);
+    else /* message to not existing/active channel */
+      printformat_module_dest("fe-common/silc", &dest,
 			 VERIFIED_MSG(verified, SILCTXT_PUBMSG_HILIGHT_CHANNEL),
 			 color, printnick, target, msg, nickmode);
-    } else {
+
+  } else {
+    if (!print_channel)
+      printformat_module("fe-common/silc", server, target, level,
+      		 for_me ? VERIFIED_MSG(verified, SILCTXT_PUBMSG_ME) :
+      		 	  VERIFIED_MSG(verified,SILCTXT_PUBMSG),
+      		 printnick, msg, nickmode);
+    else
       printformat_module("fe-common/silc", server, target, level,
 			 for_me ? VERIFIED_MSG(verified, SILCTXT_PUBMSG_ME_CHANNEL) :
 			 VERIFIED_MSG(verified, SILCTXT_PUBMSG_CHANNEL),
 			 printnick, target, msg, nickmode);
-    }
   }
 
   g_free_not_null(freemsg);

Modified: silc-client/branches/upstream/current/apps/irssi/src/fe-text/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/fe-text/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/fe-text/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/fe-text/Makefile.in Fri Jun 29 13:50:15 2007
@@ -218,6 +218,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/src/lib-config/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/lib-config/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/lib-config/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/lib-config/Makefile.in Fri Jun 29 13:50:15 2007
@@ -150,6 +150,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/src/lib-popt/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/lib-popt/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/lib-popt/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/lib-popt/Makefile.in Fri Jun 29 13:50:15 2007
@@ -150,6 +150,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.am (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 
 include $(top_srcdir)/Makefile.defines.in
 
-moduledir = $(silc_modulesdir)
+moduledir = @SILC_IRSSIDIR@
 
 if SILCPLUGIN
 perl_dirs = silc

Modified: silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/perl/Makefile.in Fri Jun 29 13:50:15 2007
@@ -213,6 +213,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@
@@ -287,7 +288,7 @@
 	-DSCRIPTDIR=\""$(SCRIPTDIR)"\" \
 	-DPERL_USE_LIB=\""$(PERL_USE_LIB)"\" \
 	-DPERL_STATIC_LIBS=$(PERL_STATIC_LIBS) $(PERL_CFLAGS)
-moduledir = $(silc_modulesdir)
+moduledir = @SILC_IRSSIDIR@
 @SILCPLUGIN_FALSE at perl_dirs = common ui textui silc
 @SILCPLUGIN_TRUE at perl_dirs = silc
 @SILCPLUGIN_FALSE at SCRIPTDIR = "$(datadir)/silc/scripts"

Modified: silc-client/branches/upstream/current/apps/irssi/src/silc/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/silc/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/silc/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/silc/Makefile.in Fri Jun 29 13:50:15 2007
@@ -156,6 +156,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@

Modified: silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.am (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.am Fri Jun 29 13:50:15 2007
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.defines.in
 
-moduledir = $(silc_modulesdir)
+moduledir = @SILC_IRSSIDIR@
 
 
 IRSSI_INCLUDE=../../..

Modified: silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.in (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/silc/core/Makefile.in Fri Jun 29 13:50:15 2007
@@ -203,6 +203,7 @@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SILC_IRSSIDIR = @SILC_IRSSIDIR@
 STRIP = @STRIP@
 TEXTUI_LIBS = @TEXTUI_LIBS@
 VERSION = @VERSION@
@@ -274,7 +275,7 @@
 	-I$(silc_top_srcdir)/includes \
 	-I$(silc_top_srcdir)/doc
 
-moduledir = $(silc_modulesdir)
+moduledir = @SILC_IRSSIDIR@
 IRSSI_INCLUDE = ../../..
 @SILCPLUGIN_FALSE at EXTRA_CFLAGS = 
 @SILCPLUGIN_TRUE at EXTRA_CFLAGS = -DSILC_PLUGIN

Modified: silc-client/branches/upstream/current/apps/irssi/src/silc/core/client_ops.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/silc/core/client_ops.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/silc/core/client_ops.c (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/silc/core/client_ops.c Fri Jun 29 13:50:15 2007
@@ -729,11 +729,10 @@
     name = va_arg(va, char *);
     client_entry = va_arg(va, SilcClientEntry);
 
-    memset(buf, 0, sizeof(buf));
-    snprintf(buf, sizeof(buf) - 1, "%s@%s",
-	     client_entry->username, client_entry->hostname);
-    signal_emit("message invite", 4, server, channel ? channel->channel_name :
-		name, client_entry->nickname, buf);
+    silc_snprintf(buf, sizeof(buf) - 1, "%s@%s",
+		  client_entry->username, client_entry->hostname);
+    signal_emit("message invite", 4, server, name,
+		client_entry->nickname, buf);
     break;
 
   case SILC_NOTIFY_TYPE_JOIN:
@@ -1737,6 +1736,20 @@
       NICK_REC *ownnick;
 
       if (SILC_STATUS_IS_ERROR(status)) {
+	if (status == SILC_STATUS_ERR_NO_SUCH_SERVER) {
+	  char *tmp = va_arg(vp, char *);
+	  if (tmp)
+	    silc_say_error("JOIN: %s: %s", tmp,
+			   silc_get_status_message(status));
+	  return;
+	}
+	if (status == SILC_STATUS_ERR_NO_SUCH_CHANNEL) {
+	  char *tmp = va_arg(vp, char *);
+	  if (tmp)
+	    silc_say_error("JOIN: %s: %s", tmp,
+			   silc_get_status_message(status));
+	  return;
+	}
 	silc_say_error("JOIN: %s", silc_get_status_message(status));
 	return;
       }

Modified: silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-core.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-core.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-core.c (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-core.c Fri Jun 29 13:50:15 2007
@@ -50,7 +50,6 @@
 static int init_failed = 0;
 #endif
 
-static int idletag = -1;
 static int running = 0;
 
 /* SILC Client */
@@ -77,10 +76,67 @@
 void silc_core_deinit(void);
 #endif
 
-static int my_silc_scheduler(void)
-{
+static gboolean my_silc_scheduler(gpointer data)
+{
+  SILC_LOG_DEBUG(("Timeout"));
   silc_client_run_one(silc_client);
-  return 1;
+  return FALSE;
+}
+
+static gboolean my_silc_scheduler_fd(GIOChannel *source,
+                                     GIOCondition condition,
+                                     gpointer data)
+{
+  SILC_LOG_DEBUG(("I/O event, %d", SILC_PTR_TO_32(data)));
+  silc_client_run_one(silc_client);
+  return TRUE;
+}
+
+static void scheduler_notify_cb(SilcSchedule schedule,
+				SilcBool added, SilcTask task,
+				SilcBool fd_task, SilcUInt32 fd,
+				SilcTaskEvent event,
+				long seconds, long useconds,
+				void *context)
+{
+  if (added) {
+    if (fd_task) {
+      /* Add fd */
+      GIOChannel *ch;
+      guint e = 0;
+
+      SILC_LOG_DEBUG(("Add fd %d, events %d", fd, event));
+      g_source_remove_by_user_data(SILC_32_TO_PTR(fd));
+
+      if (event & SILC_TASK_READ)
+        e |= (G_IO_IN | G_IO_PRI | G_IO_HUP | G_IO_ERR);
+      if (event & SILC_TASK_WRITE)
+        e |= (G_IO_OUT | G_IO_HUP | G_IO_ERR | G_IO_NVAL);
+
+      if (e) {
+	ch = g_io_channel_unix_new(fd);
+	g_io_add_watch(ch, e, my_silc_scheduler_fd, SILC_32_TO_PTR(fd));
+	g_io_channel_unref(ch);
+      }
+    } else {
+      /* Add timeout */
+      guint t;
+
+      /* Zero timeouts are delievered always immediately, as per
+	 SilcSchedule API documentation, no need to add them to glib. */
+      if (!seconds && !useconds)
+	return;
+
+      t = (seconds * 1000) + (useconds / 1000);
+      SILC_LOG_DEBUG(("interval %d msec", t));
+      g_timeout_add(t, my_silc_scheduler, NULL);
+    }
+  } else {
+    if (fd_task) {
+      /* Remove fd */
+      g_source_remove_by_user_data(SILC_32_TO_PTR(fd));
+    }
+  }
 }
 
 static CHATNET_REC *create_chatnet(void)
@@ -604,6 +660,8 @@
     return;
   }
 
+  silc_schedule_set_notify(silc_client->schedule, scheduler_notify_cb, NULL);
+
   silc_log_set_callback(SILC_LOG_INFO, silc_log_misc, NULL);
   silc_log_set_callback(SILC_LOG_WARNING, silc_log_misc, NULL);
   silc_log_set_callback(SILC_LOG_ERROR, silc_log_misc, NULL);
@@ -611,8 +669,8 @@
 
   silc_hash_alloc("sha1", &sha1hash);
 
-  /* register SILC scheduler */
-  idletag = g_timeout_add(5, (GSourceFunc) my_silc_scheduler, NULL);
+  /* Run SILC scheduler */
+  my_silc_scheduler(NULL);
 }
 
 /* Init SILC. Called from src/fe-text/silc.c */
@@ -717,6 +775,7 @@
   /* Initialize client parameters */
   memset(&params, 0, sizeof(params));
   strcat(params.nickname_format, settings_get_str("nickname_format"));
+  params.full_channel_names = TRUE;
 
   /* Allocate SILC client */
   silc_client = silc_client_alloc(&ops, &params, NULL, silc_version_string);
@@ -790,12 +849,9 @@
 
 void silc_core_deinit(void)
 {
-  if (idletag != -1)
-    g_source_remove(idletag);
-
   if (running) {
-    int stopped = 0;
-    silc_client_stop(silc_client, silc_stopped, &stopped);
+    volatile int stopped = 0;
+    silc_client_stop(silc_client, silc_stopped, (void *)&stopped);
     while (!stopped)
       silc_client_run_one(silc_client);
   }

Modified: silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-servers.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-servers.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-servers.c (original)
+++ silc-client/branches/upstream/current/apps/irssi/src/silc/core/silc-servers.c Fri Jun 29 13:50:15 2007
@@ -102,9 +102,14 @@
   clients = silc_client_get_clients_local(silc_client, server->conn,
 					  rec->nick, FALSE);
   if (!clients) {
-    printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
-	      "%s: There is no such client (did you mean %s?)", rec->nick,
-	      target->nickname);
+    if (strchr(rec->nick, '@') && target->server)
+      printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
+		"%s: There is no such client (did you mean %s@%s?)", rec->nick,
+		target->nickname, target->server);
+    else
+      printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
+		"%s: There is no such client (did you mean %s?)", rec->nick,
+		target->nickname);
     goto out;
   }
 
@@ -275,6 +280,7 @@
 			    void *context)
 {
   SILC_SERVER_REC *server = context;
+  FtpSession ftp;
   char *file;
 
   SILC_LOG_DEBUG(("Connection callback %p, status %d, error %d, message %s",
@@ -348,6 +354,12 @@
 	       silc_get_status_message(error), error,
 	       message ? message : "");
 
+    /* Close FTP sessions */
+    silc_dlist_start(server->ftp_sessions);
+    while ((ftp = silc_dlist_get(server->ftp_sessions)))
+      silc_client_file_close(client, conn, ftp->session_id);
+    silc_dlist_uninit(server->ftp_sessions);
+
     if (server->conn)
       server->conn->context = NULL;
     server->conn = NULL;
@@ -453,8 +465,6 @@
 {
   if (!IS_SILC_SERVER(server))
     return;
-
-  silc_dlist_uninit(server->ftp_sessions);
 
   if (server->conn) {
     /* Close connection */
@@ -470,9 +480,11 @@
   }
 
   /* SILC closes the handle */
-  g_io_channel_unref(net_sendbuffer_handle(server->handle));
-  net_sendbuffer_destroy(server->handle, FALSE);
-  server->handle = NULL;
+  if (server->handle) {
+    g_io_channel_unref(net_sendbuffer_handle(server->handle));
+    net_sendbuffer_destroy(server->handle, FALSE);
+    server->handle = NULL;
+  }
 }
 
 SERVER_REC *silc_server_init_connect(SERVER_CONNECT_REC *conn)

Modified: silc-client/branches/upstream/current/configure
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/configure?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/configure (original)
+++ silc-client/branches/upstream/current/configure Fri Jun 29 13:50:15 2007
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for Client 1.1.
+# Generated by GNU Autoconf 2.61 for Client 1.1.1.
 #
 # Report bugs to <silc-devel at lists.silcnet.org>.
 #
@@ -728,8 +728,8 @@
 # Identity of this package.
 PACKAGE_NAME='Client'
 PACKAGE_TARNAME='silc-client'
-PACKAGE_VERSION='1.1'
-PACKAGE_STRING='Client 1.1'
+PACKAGE_VERSION='1.1.1'
+PACKAGE_STRING='Client 1.1.1'
 PACKAGE_BUGREPORT='silc-devel at lists.silcnet.org'
 
 # Factoring default headers for most tests.
@@ -951,6 +951,7 @@
 __SILC_HAVE_PTHREAD
 __SILC_HAVE_SIM
 __SILC_ENABLE_DEBUG
+__SILC_PACKAGE_VERSION
 SILC_LIBTOOLFIX_TRUE
 SILC_LIBTOOLFIX_FALSE
 INCLUDE_DEFINES_INT
@@ -1479,7 +1480,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Client 1.1 to adapt to many kinds of systems.
+\`configure' configures Client 1.1.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1550,7 +1551,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Client 1.1:";;
+     short | recursive ) echo "Configuration of Client 1.1.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1568,7 +1569,6 @@
   --enable-debug          enable debugging
   --disable-optimizations do not use any compiler optimizations
   --disable-asm           do not use assembler optimizations
-  --enable-silc-plugin    Compile the SILC Plugin instead of the SILC Client
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1590,6 +1590,8 @@
   --with-perl[=yes|no|module]  Build with Perl support - also specifies
                                if it should be built into main silc binary
                                (static, default) or as a module
+  --with-silc-plugin[=DIR] Compile the SILC Plugin for Irssi, specify
+                           Irssi location [/usr/lib/irssi]
 
 Some influential environment variables:
   CC          C compiler command
@@ -1677,7 +1679,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Client configure 1.1
+Client configure 1.1.1
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1691,7 +1693,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Client $as_me 1.1, which was
+It was created by Client $as_me 1.1.1, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2507,7 +2509,7 @@
 
 # Define the identity of the package.
  PACKAGE='silc-client'
- VERSION='1.1'
+ VERSION='1.1.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2986,6 +2988,10 @@
 # Put here any platform specific stuff
 #
 case "$target" in
+  *-*-linux*)
+    check_threads=true
+    CFLAGS=`echo $CFLAGS -D_GNU_SOURCE`
+    ;;
   *-*-freebsd*)
     check_threads=true
     ;;
@@ -4367,6 +4373,7 @@
 __SILC_HAVE_PTHREAD=""
 __SILC_HAVE_SIM=""
 __SILC_ENABLE_DEBUG=""
+
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
@@ -5006,7 +5013,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5009 "configure"' > conftest.$ac_ext
+  echo '#line 5016 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7737,11 +7744,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7740: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7747: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7744: \$? = $ac_status" >&5
+   echo "$as_me:7751: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8005,11 +8012,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8008: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8015: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8012: \$? = $ac_status" >&5
+   echo "$as_me:8019: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8109,11 +8116,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8112: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8119: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8116: \$? = $ac_status" >&5
+   echo "$as_me:8123: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9574,7 +9581,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 9577 "configure"' > conftest.$ac_ext
+    echo '#line 9584 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -10438,7 +10445,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10441 "configure"
+#line 10448 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10538,7 +10545,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10541 "configure"
+#line 10548 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12877,11 +12884,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12880: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12887: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12884: \$? = $ac_status" >&5
+   echo "$as_me:12891: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -12981,11 +12988,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12984: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12991: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12988: \$? = $ac_status" >&5
+   echo "$as_me:12995: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13517,7 +13524,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 13520 "configure"' > conftest.$ac_ext
+    echo '#line 13527 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14575,11 +14582,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14578: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14585: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14582: \$? = $ac_status" >&5
+   echo "$as_me:14589: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14679,11 +14686,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14682: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14689: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14686: \$? = $ac_status" >&5
+   echo "$as_me:14693: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16124,7 +16131,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 16127 "configure"' > conftest.$ac_ext
+    echo '#line 16134 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -16901,11 +16908,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16904: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16911: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16908: \$? = $ac_status" >&5
+   echo "$as_me:16915: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17169,11 +17176,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17172: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17179: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17176: \$? = $ac_status" >&5
+   echo "$as_me:17183: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17273,11 +17280,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17276: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17283: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17280: \$? = $ac_status" >&5
+   echo "$as_me:17287: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -18738,7 +18745,7 @@
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 18741 "configure"' > conftest.$ac_ext
+    echo '#line 18748 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -27310,12 +27317,12 @@
         pkg_cv_SILCCLIENT_CFLAGS="$SILCCLIENT_CFLAGS"
     else
         if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"silcclient >= 1.1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "silcclient >= 1.1") 2>&5
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"silcclient >= 1.1.1\"") >&5
+  ($PKG_CONFIG --exists --print-errors "silcclient >= 1.1.1") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_SILCCLIENT_CFLAGS=`$PKG_CONFIG --cflags "silcclient >= 1.1" 2>/dev/null`
+  pkg_cv_SILCCLIENT_CFLAGS=`$PKG_CONFIG --cflags "silcclient >= 1.1.1" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -27328,12 +27335,12 @@
         pkg_cv_SILCCLIENT_LIBS="$SILCCLIENT_LIBS"
     else
         if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"silcclient >= 1.1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "silcclient >= 1.1") 2>&5
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"silcclient >= 1.1.1\"") >&5
+  ($PKG_CONFIG --exists --print-errors "silcclient >= 1.1.1") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_SILCCLIENT_LIBS=`$PKG_CONFIG --libs "silcclient >= 1.1" 2>/dev/null`
+  pkg_cv_SILCCLIENT_LIBS=`$PKG_CONFIG --libs "silcclient >= 1.1.1" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -27352,9 +27359,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        SILCCLIENT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "silcclient >= 1.1"`
+	        SILCCLIENT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "silcclient >= 1.1.1"`
         else
-	        SILCCLIENT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "silcclient >= 1.1"`
+	        SILCCLIENT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "silcclient >= 1.1.1"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$SILCCLIENT_PKG_ERRORS" >&5
@@ -30197,9 +30204,26 @@
 
 # Irssi SILC Plugin support
 #
-# Check whether --enable-silc-plugin was given.
-if test "${enable_silc_plugin+set}" = set; then
-  enableval=$enable_silc_plugin;
+{ echo "$as_me:$LINENO: checking whether to compile SILC Plugin for Irssi" >&5
+echo $ECHO_N "checking whether to compile SILC Plugin for Irssi... $ECHO_C" >&6; }
+
+# Check whether --with-silc-plugin was given.
+if test "${with_silc_plugin+set}" = set; then
+  withval=$with_silc_plugin;
+    case "${withval}" in
+      no)
+        { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+        ;;
+       *)
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       ;;
+    esac
+
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -30273,13 +30297,13 @@
 LIB_BASE_VERSION=1.1
 
 # libsilc versions
-LIBSILC_CURRENT=1		# prev = 1
-LIBSILC_REVISION=1		# prev = 0
+LIBSILC_CURRENT=2		# prev = 1
+LIBSILC_REVISION=0		# prev = 0
 LIBSILC_AGE=0			# prev = 0
 
 # libsilcclient versions
-LIBSILCCLIENT_CURRENT=1		# prev = 1
-LIBSILCCLIENT_REVISION=1	# prev = 0
+LIBSILCCLIENT_CURRENT=2		# prev = 1
+LIBSILCCLIENT_REVISION=0	# prev = 0
 LIBSILCCLIENT_AGE=0		# prev = 0
 
 # libsilcserver versions
@@ -30682,7 +30706,7 @@
 fi
 
 
-MODULESDIR="$silc_prefix/modules"
+MODULESDIR="$silc_prefix/lib/modules"
 
 
 
@@ -31139,6 +31163,7 @@
 #
 # Substitutions
 #
+
 
 
 
@@ -31726,7 +31751,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Client $as_me 1.1, which was
+This file was extended by Client $as_me 1.1.1, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -31779,7 +31804,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-Client config.status 1.1
+Client config.status 1.1.1
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -32206,6 +32231,7 @@
 __SILC_HAVE_PTHREAD!$__SILC_HAVE_PTHREAD$ac_delim
 __SILC_HAVE_SIM!$__SILC_HAVE_SIM$ac_delim
 __SILC_ENABLE_DEBUG!$__SILC_ENABLE_DEBUG$ac_delim
+__SILC_PACKAGE_VERSION!$__SILC_PACKAGE_VERSION$ac_delim
 SILC_LIBTOOLFIX_TRUE!$SILC_LIBTOOLFIX_TRUE$ac_delim
 SILC_LIBTOOLFIX_FALSE!$SILC_LIBTOOLFIX_FALSE$ac_delim
 INCLUDE_DEFINES_INT!$INCLUDE_DEFINES_INT$ac_delim
@@ -32213,7 +32239,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: silc-client/branches/upstream/current/configure.ac
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/configure.ac?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/configure.ac (original)
+++ silc-client/branches/upstream/current/configure.ac Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the configure.ad file in the source tree.
 
 # Source: configure.ad
-# Generated: Mon Jun  4 08:18:54 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:48 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -23,7 +23,7 @@
 #  GNU General Public License for more details.
 #
 
-AC_INIT([Client], [1.1], [silc-devel at lists.silcnet.org], [silc-client])
+AC_INIT([Client], [1.1.1], [silc-devel at lists.silcnet.org], [silc-client])
 AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE
 AC_PREREQ(2.52)
@@ -40,6 +40,10 @@
 # Put here any platform specific stuff
 #
 case "$target" in
+  *-*-linux*)
+    check_threads=true
+    CFLAGS=`echo $CFLAGS -D_GNU_SOURCE`
+    ;;
   *-*-freebsd*)
     check_threads=true
     ;;
@@ -101,6 +105,7 @@
 __SILC_HAVE_SIM=""
 __SILC_ENABLE_DEBUG=""
 
+
 AC_PROG_RANLIB
 AC_DISABLE_SHARED
 AC_PROG_LIBTOOL
@@ -601,7 +606,7 @@
 else
   # pkg-config check
   PKG_CHECK_MODULES(SILC, [silc >= 1.1], compile_libs=false, compile_libs=true)
-  PKG_CHECK_MODULES(SILCCLIENT, [silcclient >= 1.1], compile_libs=false, compile_libs=true)
+  PKG_CHECK_MODULES(SILCCLIENT, [silcclient >= 1.1.1], compile_libs=false, compile_libs=true)
 
   if test x$compile_libs = xfalse; then
     LIBSUBDIR=
@@ -1295,8 +1300,20 @@
 
 # Irssi SILC Plugin support
 #
-AC_ARG_ENABLE(silc-plugin,
-[  --enable-silc-plugin    Compile the SILC Plugin instead of the SILC Client])
+AC_MSG_CHECKING(whether to compile SILC Plugin for Irssi)
+AC_ARG_WITH(silc-plugin,
+  [[  --with-silc-plugin[=DIR] Compile the SILC Plugin for Irssi, specify
+                           Irssi location [/usr/lib/irssi]]],
+  [
+    case "${withval}" in
+      no)
+        AC_MSG_RESULT(no)
+        ;;
+       *)
+        AC_MSG_RESULT(yes)
+       ;;
+    esac
+  ],[AC_MSG_RESULT(no)])
 
 AC_CONFIG_SUBDIRS(apps/irssi)
 AC_CONFIG_FILES(
@@ -1368,13 +1385,13 @@
 LIB_BASE_VERSION=1.1
 
 # libsilc versions
-LIBSILC_CURRENT=1		# prev = 1
-LIBSILC_REVISION=1		# prev = 0
+LIBSILC_CURRENT=2		# prev = 1
+LIBSILC_REVISION=0		# prev = 0
 LIBSILC_AGE=0			# prev = 0
 
 # libsilcclient versions
-LIBSILCCLIENT_CURRENT=1		# prev = 1
-LIBSILCCLIENT_REVISION=1	# prev = 0
+LIBSILCCLIENT_CURRENT=2		# prev = 1
+LIBSILCCLIENT_REVISION=0	# prev = 0
 LIBSILCCLIENT_AGE=0		# prev = 0
 
 # libsilcserver versions
@@ -1418,7 +1435,7 @@
     )
   ])
 
-MODULESDIR="$silc_prefix/modules"
+MODULESDIR="$silc_prefix/lib/modules"
 AC_SUBST(MODULESDIR)
 
 
@@ -1570,6 +1587,7 @@
 AC_SUBST(__SILC_HAVE_PTHREAD)
 AC_SUBST(__SILC_HAVE_SIM)
 AC_SUBST(__SILC_ENABLE_DEBUG)
+AC_SUBST(__SILC_PACKAGE_VERSION)
 
 #
 # Fix the libtool to support run-time configuration.  This allows us

Modified: silc-client/branches/upstream/current/doc/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/doc/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/doc/Makefile.am (original)
+++ silc-client/branches/upstream/current/doc/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./doc/Makefile.ad file in the source tree.
 
 # Source: ./doc/Makefile.ad
-# Generated: Mon Jun  4 08:18:52 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/doc/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/doc/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/doc/Makefile.in (original)
+++ silc-client/branches/upstream/current/doc/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./doc/Makefile.ad file in the source tree.
 
 # Source: ./doc/Makefile.ad
-# Generated: Mon Jun  4 08:18:52 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -203,6 +203,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/includes/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/includes/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/includes/Makefile.am (original)
+++ silc-client/branches/upstream/current/includes/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./includes/Makefile.ad file in the source tree.
 
 # Source: ./includes/Makefile.ad
-# Generated: Mon Jun  4 08:18:52 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/includes/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/includes/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/includes/Makefile.in (original)
+++ silc-client/branches/upstream/current/includes/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./includes/Makefile.ad file in the source tree.
 
 # Source: ./includes/Makefile.ad
-# Generated: Mon Jun  4 08:18:52 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -166,6 +166,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/includes/silcdistdefs.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/includes/silcdistdefs.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/includes/silcdistdefs.h (original)
+++ silc-client/branches/upstream/current/includes/silcdistdefs.h Fri Jun 29 13:50:15 2007
@@ -1,7 +1,7 @@
 /*
   Automatically generated by Autodist 1.3.2.  Do not edit.
 
-  Generated: Mon Jun  4 08:18:28 EEST 2007 by priikone
+  Generated: Thu Jun 28 19:52:22 EEST 2007 by priikone
   Distribution: Client
   License: 
 */

Modified: silc-client/branches/upstream/current/includes/silcversion.h.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/includes/silcversion.h.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/includes/silcversion.h.in (original)
+++ silc-client/branches/upstream/current/includes/silcversion.h.in Fri Jun 29 13:50:15 2007
@@ -24,6 +24,11 @@
 extern "C" {
 #endif
 
+/* Version check macro.  Use this to check that package is of specific
+   version compile time.  Use the __SILC_XXX_VERSION below in comparison. */
+#define SILC_VERSION(a, b, c) (((a) << 24) + ((b) << 16) + ((c) << 8)
+ at __SILC_PACKAGE_VERSION@
+
 #define SILC_VERSION_STRING "@VERSION@"
 #define SILC_DIST_VERSION_STRING "@VERSION@"
 #define SILC_PROTOCOL_VERSION_STRING "SILC-1.2- at VERSION@ @PACKAGE@"

Modified: silc-client/branches/upstream/current/lib/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/Makefile.ad file in the source tree.
 
 # Source: ./lib/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/Makefile.ad file in the source tree.
 
 # Source: ./lib/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -215,6 +215,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/contrib/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/contrib/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/contrib/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/contrib/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/contrib/Makefile.ad file in the source tree.
 
 # Source: ./lib/contrib/Makefile.ad
-# Generated: Mon Jun  4 08:18:54 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/contrib/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/contrib/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/contrib/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/contrib/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/contrib/Makefile.ad file in the source tree.
 
 # Source: ./lib/contrib/Makefile.ad
-# Generated: Mon Jun  4 08:18:54 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -227,6 +227,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcapputil/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcapputil/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcapputil/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silcapputil/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silcapputil/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcapputil/Makefile.ad
-# Generated: Mon Jun  4 08:18:54 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silcapputil/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcapputil/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcapputil/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcapputil/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silcapputil/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcapputil/Makefile.ad
-# Generated: Mon Jun  4 08:18:54 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -220,6 +220,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcapputil/silcapputil.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcapputil/silcapputil.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcapputil/silcapputil.c (original)
+++ silc-client/branches/upstream/current/lib/silcapputil/silcapputil.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: silcapputil.c,v 1.9.2.1 2007/06/01 21:56:21 priikone Exp $ */
+/* $Id: silcapputil.c,v 1.9.2.2 2007/06/18 05:21:06 priikone Exp $ */
 
 #include "silc.h"
 
@@ -144,6 +144,12 @@
     }
 
     silc_free(def);
+  }
+
+  if (!strstr(identifier, "UN=") || !strstr(identifier, "HN=")) {
+    fprintf(stderr, "Invalid public key identifier.  You must specify both "
+	    "UN and HN\n");
+    return FALSE;
   }
 
   rng = silc_rng_alloc();
@@ -202,12 +208,14 @@
     return FALSE;
 
   /* Save public key into file */
-  silc_pkcs_save_public_key(pkfile, public_key, SILC_PKCS_FILE_BASE64);
+  if (!silc_pkcs_save_public_key(pkfile, public_key, SILC_PKCS_FILE_BASE64))
+    return FALSE;
 
   /* Save private key into file */
-  silc_pkcs_save_private_key(prvfile, private_key,
-			     (const unsigned char *)pass, strlen(pass),
-			     SILC_PKCS_FILE_BIN, rng);
+  if (!silc_pkcs_save_private_key(prvfile, private_key,
+				  (const unsigned char *)pass, strlen(pass),
+				  SILC_PKCS_FILE_BIN, rng))
+    return FALSE;
 
   if (return_public_key)
     *return_public_key = public_key;

Modified: silc-client/branches/upstream/current/lib/silcasn1/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcasn1/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcasn1/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silcasn1/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silcasn1/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcasn1/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silcasn1/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcasn1/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcasn1/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcasn1/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silcasn1/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcasn1/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -221,6 +221,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcasn1/silcasn1_decode.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcasn1/silcasn1_decode.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcasn1/silcasn1_decode.c (original)
+++ silc-client/branches/upstream/current/lib/silcasn1/silcasn1_decode.c Fri Jun 29 13:50:15 2007
@@ -230,7 +230,7 @@
     ret = FALSE;						\
     goto fail;							\
   }								\
-  *s = silc_smalloc_ua(stack1, *s_len + 1);			\
+  *s = silc_smalloc(stack1, *s_len + 1);			\
   if (*s) {							\
     silc_utf8_encode(rdata, rdata_len, (enc), *s, *s_len);	\
     (*s)[*s_len] = '\0';					\

Modified: silc-client/branches/upstream/current/lib/silcasn1/silcasn1_encode.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcasn1/silcasn1_encode.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcasn1/silcasn1_encode.c (original)
+++ silc-client/branches/upstream/current/lib/silcasn1/silcasn1_encode.c Fri Jun 29 13:50:15 2007
@@ -38,7 +38,7 @@
     goto fail;								\
   }									\
   silc_stack_push(asn1->stack2, &frame);				\
-  s = silc_smalloc_ua(stack2, s_len + 1);				\
+  s = silc_smalloc(stack2, s_len + 1);					\
   if (s) {								\
     silc_utf8_decode(d, d_len, (enc), s, s_len);			\
     s[s_len] = '\0';							\

Modified: silc-client/branches/upstream/current/lib/silcclient/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcclient/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcclient/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silcclient/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silcclient/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcclient/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silcclient/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcclient/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcclient/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcclient/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silcclient/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcclient/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -224,6 +224,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcclient/client_entry.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcclient/client_entry.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcclient/client_entry.c (original)
+++ silc-client/branches/upstream/current/lib/silcclient/client_entry.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: client_entry.c,v 1.27.2.3 2007/06/02 18:17:45 priikone Exp $ */
+/* $Id: client_entry.c,v 1.27.2.6 2007/06/10 18:32:58 priikone Exp $ */
 
 #include "silc.h"
 #include "silcclient.h"
@@ -72,19 +72,23 @@
   SilcList list;
   SilcDList clients;
   SilcClientEntry entry;
-  char *nicknamec, *parsed = NULL, *format = NULL;
+  char nick[128 + 1], *nicknamec, *parsed = NULL, *format = NULL;
+  char server[256 + 1];
 
   if (!client || !conn || !nickname)
     return NULL;
 
+  /* Get nickname from nickname at server string */
+  silc_parse_userfqdn(nickname, nick, sizeof(nick), server, sizeof(server));
+
   /* Parse nickname in case it is formatted */
-  if (!silc_client_nickname_parse(client, conn, (char *)nickname, &parsed))
+  if (!silc_client_nickname_parse(client, conn, (char *)nick, &parsed))
     return NULL;
 
   if (!get_all && parsed)
-    format = (char *)nickname;
+    format = (char *)nick;
   if (!parsed) {
-    parsed = silc_memdup(nickname, strlen(nickname));
+    parsed = silc_memdup(nick, strlen(nick));
     if (!parsed)
       return NULL;
   }
@@ -133,6 +137,14 @@
     /* Check multiple cache entries for exact match */
     while ((id_cache = silc_list_get(list))) {
       entry = id_cache->context;
+
+      /* If server was provided, find entries that either have no server
+	 set or have the same server.  Ignore those that have different
+	 server. */
+      if (server[0] && entry->server &&
+	  !silc_utf8_strcasecmp(entry->server, server))
+	continue;
+
       if (silc_utf8_strcasecmp(entry->nickname,
 			       format ? format : parsed) &&
 	  (!get_valid || entry->internal.valid)) {
@@ -769,7 +781,7 @@
 				       SilcUInt32 mode)
 {
   SilcClientEntry client_entry;
-  char *nick = NULL;
+  char *nick = NULL, parsed[128 + 1];
 
   SILC_LOG_DEBUG(("Adding new client entry"));
 
@@ -783,14 +795,21 @@
   client_entry->id = *id;
   client_entry->mode = mode;
   client_entry->realname = userinfo ? strdup(userinfo) : NULL;
-  silc_parse_userfqdn(nickname, client_entry->nickname,
-		      sizeof(client_entry->nickname),
-		      client_entry->server,
-		      sizeof(client_entry->server));
+
+  silc_parse_userfqdn(nickname, parsed, sizeof(parsed),
+		      client_entry->server, sizeof(client_entry->server));
+  if (nickname && client->internal->params->full_nicknames)
+    silc_snprintf(client_entry->nickname, sizeof(client_entry->nickname),
+		  nickname);
+  else if (nickname)
+    silc_snprintf(client_entry->nickname, sizeof(client_entry->nickname),
+		  parsed);
+
   silc_parse_userfqdn(username, client_entry->username,
 		      sizeof(client_entry->username),
 		      client_entry->hostname,
 		      sizeof(client_entry->hostname));
+
   client_entry->channels = silc_hash_table_alloc(1, silc_hash_ptr, NULL, NULL,
 						 NULL, NULL, NULL, TRUE);
   if (!client_entry->channels) {
@@ -801,8 +820,7 @@
 
   /* Normalize nickname */
   if (client_entry->nickname[0]) {
-    nick = silc_identifier_check(client_entry->nickname,
-				 strlen(client_entry->nickname),
+    nick = silc_identifier_check(parsed, strlen(parsed),
 				 SILC_STRING_UTF8, 128, NULL);
     if (!nick) {
       silc_free(client_entry->realname);
@@ -852,7 +870,7 @@
 			       const char *userinfo,
 			       SilcUInt32 mode)
 {
-  char *nick = NULL;
+  char *nick = NULL, parsed[128 + 1];
 
   SILC_LOG_DEBUG(("Update client entry"));
 
@@ -860,20 +878,25 @@
 
   if (!client_entry->realname && userinfo)
     client_entry->realname = strdup(userinfo);
+
   if ((!client_entry->username[0] || !client_entry->hostname[0]) && username)
     silc_parse_userfqdn(username, client_entry->username,
 			sizeof(client_entry->username),
 			client_entry->hostname,
 			sizeof(client_entry->username));
+
   if (!client_entry->nickname[0] && nickname) {
-    silc_parse_userfqdn(nickname, client_entry->nickname,
-			sizeof(client_entry->nickname),
-			client_entry->server,
-			sizeof(client_entry->server));
+    silc_parse_userfqdn(nickname, parsed, sizeof(parsed),
+			client_entry->server, sizeof(client_entry->server));
+    if (client->internal->params->full_nicknames)
+      silc_snprintf(client_entry->nickname, sizeof(client_entry->nickname),
+		    nickname);
+    else
+      silc_snprintf(client_entry->nickname, sizeof(client_entry->nickname),
+		    parsed);
 
     /* Normalize nickname */
-    nick = silc_identifier_check(client_entry->nickname,
-				 strlen(client_entry->nickname),
+    nick = silc_identifier_check(parsed, strlen(parsed),
 				 SILC_STRING_UTF8, 128, NULL);
     if (!nick) {
       silc_rwlock_unlock(client_entry->internal.lock);
@@ -1345,32 +1368,66 @@
 					 SilcClientConnection conn,
 					 char *channel)
 {
+  SilcList list;
   SilcIDCacheEntry id_cache;
-  SilcChannelEntry entry;
+  SilcChannelEntry entry = NULL;
+  char chname[256 + 1], server[256 + 1];
 
   if (!client || !conn || !channel)
     return NULL;
 
   SILC_LOG_DEBUG(("Find channel %s", channel));
 
+  /* Parse server name from channel name */
+  silc_parse_userfqdn(channel, chname, sizeof(chname), server, sizeof(server));
+
   /* Normalize name for search */
-  channel = silc_channel_name_check(channel, strlen(channel), SILC_STRING_UTF8,
+  channel = silc_channel_name_check(chname, strlen(chname), SILC_STRING_UTF8,
 				    256, NULL);
   if (!channel)
     return NULL;
 
   silc_mutex_lock(conn->internal->lock);
 
-  if (!silc_idcache_find_by_name_one(conn->internal->channel_cache, channel,
-				     &id_cache)) {
+  if (!silc_idcache_find_by_name(conn->internal->channel_cache, channel,
+				 &list)) {
     silc_mutex_unlock(conn->internal->lock);
     silc_free(channel);
     return NULL;
   }
 
-  SILC_LOG_DEBUG(("Found"));
-
-  entry = id_cache->context;
+  /* If server name was specified with channel name, find the correct
+     channel entry with the server name.  There can only be one channel
+     with same name on same server. */
+  silc_list_start(list);
+  if (server[0]) {
+    while ((id_cache = silc_list_get(list))) {
+      entry = id_cache->context;
+      if (!entry->server[0])
+	continue;
+      if (silc_utf8_strcasecmp(entry->server, server))
+	break;
+    }
+  } else {
+    /* Get first channel without server name specified or one with our
+       current server connection name */
+    while ((id_cache = silc_list_get(list))) {
+      entry = id_cache->context;
+      if (!entry->server[0])
+	break;
+      if (silc_utf8_strcasecmp(entry->server, conn->remote_host))
+	break;
+    }
+  }
+
+  if (!id_cache) {
+    silc_mutex_unlock(conn->internal->lock);
+    silc_free(channel);
+    return NULL;
+  }
+
+  SILC_LOG_DEBUG(("Found channel %s%s%s", entry->channel_name,
+		  entry->server[0] ? "@" : "", entry->server));
 
   /* Reference */
   silc_client_ref_channel(client, conn, entry);
@@ -1559,9 +1616,9 @@
 					 SilcChannelID *channel_id)
 {
   SilcChannelEntry channel;
-  char *channel_namec;
-
-  SILC_LOG_DEBUG(("Start"));
+  char *channel_namec, name[256 + 1];
+
+  SILC_LOG_DEBUG(("Adding channel %s", channel_name));
 
   channel = silc_calloc(1, sizeof(*channel));
   if (!channel)
@@ -1572,8 +1629,16 @@
   channel->id = *channel_id;
   channel->mode = mode;
 
-  channel->channel_name = strdup(channel_name);
+  silc_parse_userfqdn(channel_name, name, sizeof(name),
+		      channel->server, sizeof(channel->server));
+  if (client->internal->params->full_channel_names)
+    channel->channel_name = strdup(channel_name);
+  else
+    channel->channel_name = strdup(name);
+
   if (!channel->channel_name) {
+    silc_rwlock_free(channel->internal.lock);
+    silc_atomic_uninit16(&channel->internal.refcnt);
     silc_free(channel);
     return NULL;
   }
@@ -1581,15 +1646,19 @@
   channel->user_list = silc_hash_table_alloc(1, silc_hash_ptr, NULL, NULL,
 					     NULL, NULL, NULL, TRUE);
   if (!channel->user_list) {
+    silc_rwlock_free(channel->internal.lock);
+    silc_atomic_uninit16(&channel->internal.refcnt);
     silc_free(channel->channel_name);
     silc_free(channel);
     return NULL;
   }
 
   /* Normalize channel name */
-  channel_namec = silc_channel_name_check(channel_name, strlen(channel_name),
+  channel_namec = silc_channel_name_check(name, strlen(name),
 					  SILC_STRING_UTF8, 256, NULL);
   if (!channel_namec) {
+    silc_rwlock_free(channel->internal.lock);
+    silc_atomic_uninit16(&channel->internal.refcnt);
     silc_free(channel->channel_name);
     silc_hash_table_free(channel->user_list);
     silc_free(channel);
@@ -1601,6 +1670,8 @@
   /* Add channel to cache, the normalized channel name is saved to cache */
   if (!silc_idcache_add(conn->internal->channel_cache, channel_namec,
 			&channel->id, channel)) {
+    silc_rwlock_free(channel->internal.lock);
+    silc_atomic_uninit16(&channel->internal.refcnt);
     silc_free(channel_namec);
     silc_free(channel->channel_name);
     silc_hash_table_free(channel->user_list);

Modified: silc-client/branches/upstream/current/lib/silcclient/command.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcclient/command.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcclient/command.c (original)
+++ silc-client/branches/upstream/current/lib/silcclient/command.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: command.c,v 1.160 2007/05/19 12:02:02 priikone Exp $ */
+/* $Id: command.c,v 1.160.2.1 2007/06/10 18:32:58 priikone Exp $ */
 
 #include "silc.h"
 #include "silcclient.h"
@@ -938,7 +938,7 @@
   SilcClient client = conn->client;
   SilcChannelEntry channel;
   SilcBuffer idp;
-  char *name;
+  char *name, tmp[512];
 
   if (cmd->argc < 2 || cmd->argc > 3) {
     SAY(conn->client, conn, SILC_CLIENT_MESSAGE_INFO,
@@ -953,7 +953,15 @@
       COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
       goto out;
     }
-    name = conn->current_channel->channel_name;
+
+    if (client->internal->params->full_channel_names)
+      silc_snprintf(tmp, sizeof(tmp), conn->current_channel->channel_name);
+    else
+      silc_snprintf(tmp, sizeof(tmp), "%s%s%s",
+		    conn->current_channel->channel_name,
+		    conn->current_channel->server[0] ? "@" : "",
+		    conn->current_channel->server);
+    name = tmp;
   } else {
     name = cmd->argv[1];
   }
@@ -2119,7 +2127,7 @@
   SilcBuffer idp, idp2;
   SilcClientEntry target;
   SilcDList clients = NULL;
-  char *name;
+  char *name, tmp[512];
 
   if (cmd->argc < 3) {
     SAY(conn->client, conn, SILC_CLIENT_MESSAGE_INFO,
@@ -2133,7 +2141,15 @@
       COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
       goto out;
     }
-    name = conn->current_channel->channel_name;
+
+    if (client->internal->params->full_channel_names)
+      silc_snprintf(tmp, sizeof(tmp), conn->current_channel->channel_name);
+    else
+      silc_snprintf(tmp, sizeof(tmp), "%s%s%s",
+		    conn->current_channel->channel_name,
+		    conn->current_channel->server[0] ? "@" : "",
+		    conn->current_channel->server);
+    name = tmp;
   } else {
     name = cmd->argv[1];
   }
@@ -2521,7 +2537,7 @@
   SilcClient client = conn->client;
   SilcChannelEntry channel;
   SilcBuffer idp;
-  char *name;
+  char *name, tmp[512];
 
   if (cmd->argc != 2) {
     SAY(conn->client, conn, SILC_CLIENT_MESSAGE_INFO,
@@ -2535,7 +2551,15 @@
       COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
       goto out;
     }
-    name = conn->current_channel->channel_name;
+
+    if (client->internal->params->full_channel_names)
+      silc_snprintf(tmp, sizeof(tmp), conn->current_channel->channel_name);
+    else
+      silc_snprintf(tmp, sizeof(tmp), "%s%s%s",
+		    conn->current_channel->channel_name,
+		    conn->current_channel->server[0] ? "@" : "",
+		    conn->current_channel->server);
+    name = tmp;
   } else {
     name = cmd->argv[1];
   }
@@ -2580,7 +2604,7 @@
 {
   SilcClientCommandContext cmd = fsm_context;
   SilcClientConnection conn = cmd->conn;
-  char *name;
+  char *name, tmp[512];
 
   if (cmd->argc != 2) {
     SAY(conn->client, conn, SILC_CLIENT_MESSAGE_INFO,
@@ -2594,7 +2618,15 @@
       COMMAND_ERROR(SILC_STATUS_ERR_NOT_ON_CHANNEL);
       goto out;
     }
-    name = conn->current_channel->channel_name;
+
+    if (conn->client->internal->params->full_channel_names)
+      silc_snprintf(tmp, sizeof(tmp), conn->current_channel->channel_name);
+    else
+      silc_snprintf(tmp, sizeof(tmp), "%s%s%s",
+		    conn->current_channel->channel_name,
+		    conn->current_channel->server[0] ? "@" : "",
+		    conn->current_channel->server);
+    name = tmp;
   } else {
     name = cmd->argv[1];
   }

Modified: silc-client/branches/upstream/current/lib/silcclient/command_reply.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcclient/command_reply.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcclient/command_reply.c (original)
+++ silc-client/branches/upstream/current/lib/silcclient/command_reply.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: command_reply.c,v 1.149 2007/05/07 18:34:43 priikone Exp $ */
+/* $Id: command_reply.c,v 1.149.2.3 2007/06/18 21:05:02 priikone Exp $ */
 
 #include "silc.h"
 #include "silcclient.h"
@@ -127,7 +127,7 @@
   if (cmd->error == SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID) {
     SilcChannelEntry channel;
 
-    /* Remove unknown client entry from cache */
+    /* Remove unknown channel entry from cache */
     if (!silc_argument_get_decoded(args, 2, SILC_ARGUMENT_ID, &id, NULL))
       return;
 
@@ -143,7 +143,7 @@
   if (cmd->error == SILC_STATUS_ERR_NO_SUCH_SERVER_ID) {
     SilcServerEntry server_entry;
 
-    /* Remove unknown client entry from cache */
+    /* Remove unknown server entry from cache */
     if (!silc_argument_get_decoded(args, 2, SILC_ARGUMENT_ID, &id, NULL))
       return;
 
@@ -221,7 +221,7 @@
   /** Wait for command reply */
   silc_fsm_set_state_context(fsm, NULL);
   silc_fsm_next_later(fsm, silc_client_command_reply_timeout,
-		      cmd->cmd != SILC_COMMAND_PING ? 25 : 60, 0);
+		      cmd->cmd != SILC_COMMAND_PING ? 40 : 60, 0);
   return SILC_FSM_WAIT;
 }
 
@@ -677,7 +677,8 @@
     }
 
     /* Notify application */
-    silc_client_command_callback(cmd, channel_entry, name, info);
+    silc_client_command_callback(cmd, channel_entry,
+				 channel_entry->channel_name, info);
     silc_client_unref_channel(client, conn, channel_entry);
     break;
   }
@@ -732,6 +733,7 @@
   if (!silc_client_change_nickname(client, conn, conn->local_entry,
 				   nick, &id.u.client_id, idp, idp_len)) {
     ERROR_CALLBACK(SILC_STATUS_ERR_BAD_NICKNAME);
+    silc_rwlock_unlock(conn->local_entry->internal.lock);
     goto out;
   }
 
@@ -800,7 +802,8 @@
   }
 
   /* Notify application */
-  silc_client_command_callback(cmd, channel_entry, name, topic, usercount);
+  silc_client_command_callback(cmd, channel_entry, channel_entry->channel_name,
+			       topic, usercount);
 
  out:
   silc_client_unref_channel(client, conn, channel_entry);
@@ -1302,7 +1305,7 @@
   silc_hash_table_list(channel->user_list, &htl);
 
   /* Notify application */
-  silc_client_command_callback(cmd, channel_name, channel, mode, &htl,
+  silc_client_command_callback(cmd, channel->channel_name, channel, mode, &htl,
 			       topic, cipher, hmac, channel->founder_key,
 			       channel->channel_pubkeys, channel->user_limit);
 
@@ -1944,6 +1947,8 @@
       goto out;
     }
   }
+
+  silc_rwlock_unlock(channel->internal.lock);
 
   /* Notify application */
   silc_hash_table_list(channel->user_list, &htl);

Modified: silc-client/branches/upstream/current/lib/silcclient/silcclient.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcclient/silcclient.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcclient/silcclient.h (original)
+++ silc-client/branches/upstream/current/lib/silcclient/silcclient.h Fri Jun 29 13:50:15 2007
@@ -665,13 +665,16 @@
      %H  full hostname - the full hostname of the client
 
      Example format strings: "%n#%a"     (fe. nick#2, nick#3)
-                             "%n@%h%a"   (fe. nick at host, nick at host2)
-                             "%a!%n@%h"  (fe. nick at host, 2!nick at host)
+                             "%n#%h%a"   (fe. nick#host, nick#host2)
+                             "%a!%n#%h"  (fe. nick#host, 2!nick#host)
 
      Note that there must always be some separator characters around '%n'
      format.  It is not possible to put format characters before or after
      '%n' without separators (such ash '#').  Also note that the separator
      character should be a character that cannot be part of normal nickname.
+     Note that, using '@' as a separator is not recommended as the nickname
+     string may contain it to separate a server name from the nickname (eg.
+     nickname at silcnet.org).
   */
   char nickname_format[32];
 
@@ -682,6 +685,21 @@
      already saved in the cache. It is recommended to leave this to FALSE
      value. */
   SilcBool nickname_force_format;
+
+  /* If this is set to TRUE then all nickname strings returned by the library
+     and stored by the library are in the format of 'nickname at server', eg.
+     nickname at silcnet.org.  If this is FALSE then the server name of the
+     nickname is available only from the SilcClientEntry structure.  When this
+     is TRUE the server name is still parsed to SilcClientEntry. */
+  SilcBool full_nicknames;
+
+  /* If this is set to TRUE then all channel name strings returned by the
+     library and stored by the library are in the format of 'channel at server',
+     eg. silc at silcnet.org.  If this is FALSE then the server name of the
+     channel is available only from the SilcChannelEntry structure.  When this
+     is TRUE the server name is still parsed to SilcChannelEntry.  Note that,
+     not all SILC server versions return such channel name strings. */
+  SilcBool full_channel_names;
 
   /* If this is set to TRUE, the silcclient library will not register and
      deregister the cipher, pkcs, hash and hmac algorithms. The application
@@ -1309,9 +1327,12 @@
  *    be the command name.  The variable argument list must be terminated
  *    with NULL.
  *
- *    Returns FALSE if the command is not known and TRUE after command.
- *    execution.  The `command' client operation callback will be called when
- *    the command is executed to indicate whether or not the command executed
+ *    Returns command identifier for this sent command.  It can be used
+ *    to additionally attach to the command reply using the function
+ *    silc_client_command_pending, if needed.  Returns 0 on error.
+ *
+ *    The `command' client operation callback will be called when the
+ *    command is executed to indicate whether or not the command executed
  *    successfully.
  *
  *    The `command_reply' client operation callbak will be called when reply

Modified: silc-client/branches/upstream/current/lib/silcclient/silcclient_entry.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcclient/silcclient_entry.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcclient/silcclient_entry.h (original)
+++ silc-client/branches/upstream/current/lib/silcclient/silcclient_entry.h Fri Jun 29 13:50:15 2007
@@ -78,7 +78,7 @@
  * SOURCE
  */
 struct SilcClientEntryStruct {
-  char nickname[128 + 1];	     /* Nickname */
+  char nickname[256 + 1];	     /* Nickname */
   char username[128 + 1];	     /* Username */
   char hostname[256 + 1];	     /* Hostname */
   char server  [256 + 1];	     /* SILC server name */
@@ -124,6 +124,7 @@
  */
 struct SilcChannelEntryStruct {
   char *channel_name;		     /* Channel name */
+  char server[256 + 1];		     /* SILC server name */
   char *topic;			     /* Current topic, may be NULL */
   SilcPublicKey founder_key;	     /* Founder key, may be NULL */
   SilcDList channel_pubkeys;	     /* Channel public keys, may be NULL */

Modified: silc-client/branches/upstream/current/lib/silcclient/tests/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcclient/tests/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcclient/tests/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcclient/tests/Makefile.in Fri Jun 29 13:50:15 2007
@@ -216,6 +216,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silccore/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silccore/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silccore/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silccore/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silccore/Makefile.ad file in the source tree.
 
 # Source: ./lib/silccore/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silccore/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silccore/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silccore/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silccore/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silccore/Makefile.ad file in the source tree.
 
 # Source: ./lib/silccore/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -222,6 +222,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silccore/silcpacket.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silccore/silcpacket.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silccore/silcpacket.c (original)
+++ silc-client/branches/upstream/current/lib/silccore/silcpacket.c Fri Jun 29 13:50:15 2007
@@ -19,7 +19,7 @@
 /*
  * Created: Fri Jul 25 18:52:14 1997
  */
-/* $Id: silcpacket.c,v 1.106.2.1 2007/05/24 12:34:10 priikone Exp $ */
+/* $Id: silcpacket.c,v 1.106.2.3 2007/06/24 14:16:01 priikone Exp $ */
 
 #include "silc.h"
 
@@ -638,7 +638,7 @@
 const char *silc_packet_error_string(SilcPacketError error)
 {
   if (error < SILC_PACKET_ERR_READ || error > SILC_PACKET_ERR_NO_MEMORY)
-    return "";
+    return "<invalid error code>";
   return packet_error[error];
 }
 
@@ -655,11 +655,26 @@
 
   silc_mutex_lock(engine->lock);
   silc_list_start(engine->streams);
-  while ((ps = silc_list_get(engine->streams)))
+  while ((ps = silc_list_get(engine->streams))) {
+    silc_packet_stream_ref(ps);
     silc_dlist_add(list, ps);
+  }
   silc_mutex_unlock(engine->lock);
 
   return list;
+}
+
+/* Free list returned by silc_packet_engine_get_streams */
+
+void silc_packet_engine_free_streams_list(SilcDList streams)
+{
+  SilcPacketStream ps;
+
+  silc_dlist_start(streams);
+  while ((ps = silc_dlist_get(streams)))
+    silc_packet_stream_unref(ps);
+
+  silc_dlist_uninit(streams);
 }
 
 /* Create new packet stream */
@@ -1352,37 +1367,19 @@
 			     SilcBool *src_id_set, SilcID *src_id,
 			     SilcBool *dst_id_set, SilcID *dst_id)
 {
-  if (src_id && stream->src_id) {
-    (*src_id).type = stream->src_id_type;
-    switch (stream->src_id_type) {
-    case SILC_ID_CLIENT:
-      (*src_id).u.client_id = *(SilcClientID *)stream->src_id;
-      break;
-    case SILC_ID_SERVER:
-      (*src_id).u.server_id = *(SilcServerID *)stream->src_id;
-      break;
-    case SILC_ID_CHANNEL:
-      (*src_id).u.channel_id = *(SilcChannelID *)stream->src_id;
-      break;
-    }
-  }
+  if (src_id && stream->src_id)
+    if (!silc_id_str2id2(stream->src_id, stream->src_id_len,
+			 stream->src_id_type, src_id))
+      return FALSE;
+
   if (stream->src_id && src_id_set)
     *src_id_set = TRUE;
 
-  if (dst_id && stream->dst_id) {
-    (*dst_id).type = stream->dst_id_type;
-    switch (stream->dst_id_type) {
-    case SILC_ID_CLIENT:
-      (*dst_id).u.client_id = *(SilcClientID *)stream->dst_id;
-      break;
-    case SILC_ID_SERVER:
-      (*dst_id).u.server_id = *(SilcServerID *)stream->dst_id;
-      break;
-    case SILC_ID_CHANNEL:
-      (*dst_id).u.channel_id = *(SilcChannelID *)stream->dst_id;
-      break;
-    }
-  }
+  if (dst_id && stream->dst_id)
+    if (!silc_id_str2id2(stream->dst_id, stream->dst_id_len,
+			 stream->dst_id_type, dst_id))
+      return FALSE;
+
   if (stream->dst_id && dst_id_set)
     *dst_id_set = TRUE;
 

Modified: silc-client/branches/upstream/current/lib/silccore/silcpacket.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silccore/silcpacket.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silccore/silcpacket.h (original)
+++ silc-client/branches/upstream/current/lib/silccore/silcpacket.h Fri Jun 29 13:50:15 2007
@@ -400,10 +400,23 @@
  * DESCRIPTION
  *
  *    Returns list of packet streams added to the packet engine.  The caller
- *    must free the list with silc_dlist_uninit.
+ *    must free the list with silc_packet_engine_free_streams_list.
  *
  ***/
 SilcDList silc_packet_engine_get_streams(SilcPacketEngine engine);
+
+/****f* silccore/SilcPacketAPI/silc_packet_engine_free_streams_list
+ *
+ * SYNOPSIS
+ *
+ *    void silc_packet_engine_free_streams_list(SilcDList streams);
+ *
+ * DESCRIPTION
+ *
+ *    Free's the streams list returned by silc_packet_engine_get_streams.
+ *
+ ***/
+void silc_packet_engine_free_streams_list(SilcDList streams);
 
 /****f* silccore/SilcPacketAPI/silc_packet_stream_create
  *

Modified: silc-client/branches/upstream/current/lib/silccrypt/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silccrypt/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silccrypt/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silccrypt/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silccrypt/Makefile.ad file in the source tree.
 
 # Source: ./lib/silccrypt/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silccrypt/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silccrypt/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silccrypt/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silccrypt/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silccrypt/Makefile.ad file in the source tree.
 
 # Source: ./lib/silccrypt/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -231,6 +231,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcmath/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcmath/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcmath/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silcmath/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silcmath/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcmath/Makefile.ad
-# Generated: Mon Jun  4 08:18:54 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:48 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silcmath/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcmath/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcmath/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcmath/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silcmath/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcmath/Makefile.ad
-# Generated: Mon Jun  4 08:18:54 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:48 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -225,6 +225,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcsftp/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcsftp/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcsftp/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silcsftp/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silcsftp/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcsftp/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silcsftp/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcsftp/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcsftp/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcsftp/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silcsftp/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcsftp/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -221,6 +221,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcsftp/sftp_client.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcsftp/sftp_client.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcsftp/sftp_client.c (original)
+++ silc-client/branches/upstream/current/lib/silcsftp/sftp_client.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: sftp_client.c,v 1.17 2007/05/08 16:35:34 priikone Exp $ */
+/* $Id: sftp_client.c,v 1.17.2.1 2007/06/06 14:31:13 priikone Exp $ */
 
 #include "silc.h"
 #include "silcsftp.h"
@@ -330,7 +330,7 @@
 				void *context)
 {
   SilcSFTPClient sftp = context;
-  unsigned char inbuf[63488];
+  unsigned char inbuf[65536];
   SilcBufferStruct packet;
   int ret;
 

Modified: silc-client/branches/upstream/current/lib/silcsftp/sftp_fs_memory.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcsftp/sftp_fs_memory.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcsftp/sftp_fs_memory.c (original)
+++ silc-client/branches/upstream/current/lib/silcsftp/sftp_fs_memory.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: sftp_fs_memory.c,v 1.26 2007/05/13 15:32:48 priikone Exp $ */
+/* $Id: sftp_fs_memory.c,v 1.26.2.1 2007/06/10 07:14:08 priikone Exp $ */
 /* XXX TODO Win32 support */
 
 #include "silc.h"
@@ -58,7 +58,7 @@
 /* Generates absolute path from relative path that may include '.' and '..'
    in the path. */
 
-static char *mem_expand_path(MemFSEntry root, const char *path)
+static char *memfs_expand_path(MemFSEntry root, const char *path)
 {
   if (!strstr(path, "./") && !strstr(path, "../") &&
       !strstr(path, "/..") && !strstr(path, "/."))
@@ -70,8 +70,8 @@
 
 /* Add `entry' to directory `dir'. */
 
-static SilcBool mem_add_entry(MemFSEntry dir, MemFSEntry entry,
-			      SilcBool check_perm)
+static SilcBool memfs_add_entry(MemFSEntry dir, MemFSEntry entry,
+				SilcBool check_perm)
 {
   int i;
 
@@ -115,7 +115,7 @@
 
 /* Removes entry `entry' and all entries under it recursively. */
 
-static SilcBool mem_del_entry(MemFSEntry entry, SilcBool check_perm)
+static SilcBool memfs_del_entry(MemFSEntry entry, SilcBool check_perm)
 {
   int i;
 
@@ -129,7 +129,7 @@
   /* Delete all entries recursively under this entry */
   for (i = 0; i < entry->entry_count; i++) {
     if (entry->entry[i]) {
-      if (!mem_del_entry(entry->entry[i], FALSE))
+      if (!memfs_del_entry(entry->entry[i], FALSE))
 	return FALSE;
     }
   }
@@ -153,8 +153,8 @@
 /* Finds first occurence of entry named `name' under the directory `dir'.
    This does not check subdirectories recursively. */
 
-static MemFSEntry mem_find_entry(MemFSEntry dir, const char *name,
-				 SilcUInt32 name_len)
+static MemFSEntry memfs_find_entry(MemFSEntry dir, const char *name,
+				   SilcUInt32 name_len)
 {
   int i;
 
@@ -172,13 +172,13 @@
 /* Finds the entry by the `path' which may include full path or
    relative path. */
 
-static MemFSEntry mem_find_entry_path(MemFSEntry dir, const char *p)
+static MemFSEntry memfs_find_entry_path(MemFSEntry dir, const char *p)
 {
   MemFSEntry entry = NULL;
   int len;
   char *path, *cp;
 
-  cp = path = mem_expand_path(dir, p);
+  cp = path = memfs_expand_path(dir, p);
 
   if (strlen(cp) == 1 && cp[0] == '/')
     return dir;
@@ -187,7 +187,7 @@
     cp++;
   len = strcspn(cp, DIR_SEPARATOR);
   while (cp && len) {
-    entry = mem_find_entry(dir, cp, len);
+    entry = memfs_find_entry(dir, cp, len);
     if (!entry) {
       silc_free(cp);
       return NULL;
@@ -207,8 +207,8 @@
 /* Deletes entry by the name `name' from the directory `dir'. This does
    not check subdirectories recursively. */
 
-static SilcBool mem_del_entry_name(MemFSEntry dir, const char *name,
-				   SilcUInt32 name_len, SilcBool check_perm)
+static SilcBool memfs_del_entry_name(MemFSEntry dir, const char *name,
+				     SilcUInt32 name_len, SilcBool check_perm)
 {
   MemFSEntry entry;
 
@@ -216,17 +216,17 @@
   if (check_perm)
     return FALSE;
 
-  entry = mem_find_entry(dir, name, name_len);
+  entry = memfs_find_entry(dir, name, name_len);
 
   if (entry)
-    return mem_del_entry(entry, check_perm);
+    return memfs_del_entry(entry, check_perm);
 
   return FALSE;
 }
 
 /* Create new handle and add it to the list of open handles. */
 
-static MemFSFileHandle mem_create_handle(MemFS fs, int fd, MemFSEntry entry)
+static MemFSFileHandle memfs_create_handle(MemFS fs, int fd, MemFSEntry entry)
 {
   MemFSFileHandle handle;
   int i;
@@ -275,7 +275,7 @@
 
 /* Deletes the handle and remove it from the open handle list. */
 
-static SilcBool mem_del_handle(MemFS fs, MemFSFileHandle handle)
+static SilcBool memfs_del_handle(MemFS fs, MemFSFileHandle handle)
 {
   if (handle->handle > fs->handles_count)
     return FALSE;
@@ -296,7 +296,7 @@
 
 /* Find handle by handle index. */
 
-static MemFSFileHandle mem_find_handle(MemFS fs, SilcUInt32 handle)
+static MemFSFileHandle memfs_find_handle(MemFS fs, SilcUInt32 handle)
 {
   if (handle > fs->handles_count)
     return NULL;
@@ -393,7 +393,7 @@
     return NULL;
   }
 
-  if (!mem_add_entry(dir ? dir : memfs->root, entry, FALSE)) {
+  if (!memfs_add_entry(dir ? dir : memfs->root, entry, FALSE)) {
     silc_free(entry->name);
     silc_free(entry);
     return NULL;
@@ -415,10 +415,10 @@
   SilcBool ret;
 
   if (dir)
-    return mem_del_entry(dir, FALSE);
+    return memfs_del_entry(dir, FALSE);
 
   /* Remove from root */
-  ret = mem_del_entry(memfs->root, FALSE);
+  ret = memfs_del_entry(memfs->root, FALSE);
 
   memfs->root = silc_calloc(1, sizeof(*memfs->root));
   if (!memfs->root)
@@ -467,7 +467,7 @@
     return FALSE;
   }
 
-  return mem_add_entry(dir ? dir : memfs->root, entry, FALSE);
+  return memfs_add_entry(dir ? dir : memfs->root, entry, FALSE);
 }
 
 /* Removes a file indicated by the `filename' from the directory
@@ -481,13 +481,13 @@
   if (!filename)
     return FALSE;
 
-  return mem_del_entry_name(dir ? dir : memfs->root, filename,
+  return memfs_del_entry_name(dir ? dir : memfs->root, filename,
 			    strlen(filename), FALSE);
 }
 
-SilcSFTPHandle mem_get_handle(void *context, SilcSFTP sftp,
-			      const unsigned char *data,
-			      SilcUInt32 data_len)
+SilcSFTPHandle memfs_get_handle(void *context, SilcSFTP sftp,
+				const unsigned char *data,
+				SilcUInt32 data_len)
 {
   MemFS fs = (MemFS)context;
   SilcUInt32 handle;
@@ -496,12 +496,12 @@
     return NULL;
 
   SILC_GET32_MSB(handle, data);
-  return (SilcSFTPHandle)mem_find_handle(fs, handle);
-}
-
-unsigned char *mem_encode_handle(void *context, SilcSFTP sftp,
-				 SilcSFTPHandle handle,
-				 SilcUInt32 *handle_len)
+  return (SilcSFTPHandle)memfs_find_handle(fs, handle);
+}
+
+unsigned char *memfs_encode_handle(void *context, SilcSFTP sftp,
+				   SilcSFTPHandle handle,
+				   SilcUInt32 *handle_len)
 {
   unsigned char *data;
   MemFSFileHandle h = (MemFSFileHandle)handle;
@@ -515,12 +515,12 @@
   return data;
 }
 
-void mem_open(void *context, SilcSFTP sftp,
-	      const char *filename,
-	      SilcSFTPFileOperation pflags,
-	      SilcSFTPAttributes attrs,
-	      SilcSFTPHandleCallback callback,
-	      void *callback_context)
+void memfs_open(void *context, SilcSFTP sftp,
+		const char *filename,
+		SilcSFTPFileOperation pflags,
+		SilcSFTPAttributes attrs,
+		SilcSFTPHandleCallback callback,
+		void *callback_context)
 {
   MemFS fs = (MemFS)context;
   MemFSEntry entry;
@@ -534,7 +534,7 @@
   }
 
   /* Find such file */
-  entry = mem_find_entry_path(fs->root, filename);
+  entry = memfs_find_entry_path(fs->root, filename);
   if (!entry) {
     (*callback)(sftp, SILC_SFTP_STATUS_NO_SUCH_FILE, NULL, callback_context);
     return;
@@ -580,7 +580,7 @@
   }
 
   /* File opened, return handle */
-  handle = mem_create_handle(fs, fd, entry);
+  handle = memfs_create_handle(fs, fd, entry);
   if (handle)
     (*callback)(sftp, SILC_SFTP_STATUS_OK, (SilcSFTPHandle)handle,
 		callback_context);
@@ -589,10 +589,10 @@
 		callback_context);
 }
 
-void mem_close(void *context, SilcSFTP sftp,
-	       SilcSFTPHandle handle,
-	       SilcSFTPStatusCallback callback,
-	       void *callback_context)
+void memfs_close(void *context, SilcSFTP sftp,
+		 SilcSFTPHandle handle,
+		 SilcSFTPStatusCallback callback,
+		 void *callback_context)
 {
   MemFS fs = (MemFS)context;
   MemFSFileHandle h = (MemFSFileHandle)handle;
@@ -607,16 +607,16 @@
     }
   }
 
-  mem_del_handle(fs, h);
+  memfs_del_handle(fs, h);
   (*callback)(sftp, SILC_SFTP_STATUS_OK, NULL, NULL, callback_context);
 }
 
-void mem_read(void *context, SilcSFTP sftp,
-	      SilcSFTPHandle handle,
-	      SilcUInt64 offset,
-	      SilcUInt32 len,
-	      SilcSFTPDataCallback callback,
-	      void *callback_context)
+void memfs_read(void *context, SilcSFTP sftp,
+		SilcSFTPHandle handle,
+		SilcUInt64 offset,
+		SilcUInt32 len,
+		SilcSFTPDataCallback callback,
+		void *callback_context)
 {
   MemFSFileHandle h = (MemFSFileHandle)handle;
   unsigned char data[63488];
@@ -649,13 +649,13 @@
 	      ret, callback_context);
 }
 
-void mem_write(void *context, SilcSFTP sftp,
-	       SilcSFTPHandle handle,
-	       SilcUInt64 offset,
-	       const unsigned char *data,
-	       SilcUInt32 data_len,
-	       SilcSFTPStatusCallback callback,
-	       void *callback_context)
+void memfs_write(void *context, SilcSFTP sftp,
+		 SilcSFTPHandle handle,
+		 SilcUInt64 offset,
+		 const unsigned char *data,
+		 SilcUInt32 data_len,
+		 SilcSFTPStatusCallback callback,
+		 void *callback_context)
 {
   MemFSFileHandle h = (MemFSFileHandle)handle;
   int ret;
@@ -673,52 +673,52 @@
   (*callback)(sftp, SILC_SFTP_STATUS_OK, NULL, NULL, callback_context);
 }
 
-void mem_remove(void *context, SilcSFTP sftp,
-		const char *filename,
-		SilcSFTPStatusCallback callback,
-		void *callback_context)
+void memfs_remove(void *context, SilcSFTP sftp,
+		  const char *filename,
+		  SilcSFTPStatusCallback callback,
+		  void *callback_context)
 {
   /* Remove is not supported */
   (*callback)(sftp, SILC_SFTP_STATUS_OP_UNSUPPORTED, NULL, NULL,
 	      callback_context);
 }
 
-void mem_rename(void *context, SilcSFTP sftp,
-		const char *oldname,
-		const char *newname,
-		SilcSFTPStatusCallback callback,
-		void *callback_context)
+void memfs_rename(void *context, SilcSFTP sftp,
+		  const char *oldname,
+		  const char *newname,
+		  SilcSFTPStatusCallback callback,
+		  void *callback_context)
 {
   /* Rename is not supported */
   (*callback)(sftp, SILC_SFTP_STATUS_OP_UNSUPPORTED, NULL, NULL,
 	      callback_context);
 }
 
-void mem_mkdir(void *context, SilcSFTP sftp,
-	       const char *path,
-	       SilcSFTPAttributes attrs,
-	       SilcSFTPStatusCallback callback,
-	       void *callback_context)
+void memfs_mkdir(void *context, SilcSFTP sftp,
+		 const char *path,
+		 SilcSFTPAttributes attrs,
+		 SilcSFTPStatusCallback callback,
+		 void *callback_context)
 {
   /* Mkdir is not supported */
   (*callback)(sftp, SILC_SFTP_STATUS_OP_UNSUPPORTED, NULL, NULL,
 	      callback_context);
 }
 
-void mem_rmdir(void *context, SilcSFTP sftp,
-	       const char *path,
-	       SilcSFTPStatusCallback callback,
-	       void *callback_context)
+void memfs_rmdir(void *context, SilcSFTP sftp,
+		 const char *path,
+		 SilcSFTPStatusCallback callback,
+		 void *callback_context)
 {
   /* Rmdir is not supported */
   (*callback)(sftp, SILC_SFTP_STATUS_OP_UNSUPPORTED, NULL, NULL,
 	      callback_context);
 }
 
-void mem_opendir(void *context, SilcSFTP sftp,
-		 const char *path,
-		 SilcSFTPHandleCallback callback,
-		 void *callback_context)
+void memfs_opendir(void *context, SilcSFTP sftp,
+		   const char *path,
+		   SilcSFTPHandleCallback callback,
+		   void *callback_context)
 {
   MemFS fs = (MemFS)context;
   MemFSEntry entry;
@@ -728,7 +728,7 @@
     path = (const char *)DIR_SEPARATOR;
 
   /* Find such directory */
-  entry = mem_find_entry_path(fs->root, path);
+  entry = memfs_find_entry_path(fs->root, path);
   if (!entry) {
     (*callback)(sftp, SILC_SFTP_STATUS_NO_SUCH_FILE, NULL, callback_context);
     return;
@@ -747,7 +747,7 @@
   }
 
   /* Directory opened, return handle */
-  handle = mem_create_handle(fs, 0, entry);
+  handle = memfs_create_handle(fs, 0, entry);
   if (handle)
     (*callback)(sftp, SILC_SFTP_STATUS_OK, (SilcSFTPHandle)handle,
 		callback_context);
@@ -756,10 +756,10 @@
 		callback_context);
 }
 
-void mem_readdir(void *context, SilcSFTP sftp,
-		 SilcSFTPHandle handle,
-		 SilcSFTPNameCallback callback,
-		 void *callback_context)
+void memfs_readdir(void *context, SilcSFTP sftp,
+		   SilcSFTPHandle handle,
+		   SilcSFTPNameCallback callback,
+		   void *callback_context)
 {
   MemFSFileHandle h = (MemFSFileHandle)handle;
   MemFSEntry entry;
@@ -867,10 +867,10 @@
   silc_sftp_name_free(name);
 }
 
-void mem_stat(void *context, SilcSFTP sftp,
-	      const char *path,
-	      SilcSFTPAttrCallback callback,
-	      void *callback_context)
+void memfs_stat(void *context, SilcSFTP sftp,
+		const char *path,
+		SilcSFTPAttrCallback callback,
+		void *callback_context)
 {
   MemFS fs = (MemFS)context;
   MemFSEntry entry;
@@ -882,7 +882,7 @@
     path = (const char *)DIR_SEPARATOR;
 
   /* Find such directory */
-  entry = mem_find_entry_path(fs->root, path);
+  entry = memfs_find_entry_path(fs->root, path);
   if (!entry) {
     (*callback)(sftp, SILC_SFTP_STATUS_NO_SUCH_FILE, NULL, callback_context);
     return;
@@ -921,10 +921,10 @@
   silc_sftp_attr_free(attrs);
 }
 
-void mem_lstat(void *context, SilcSFTP sftp,
-	       const char *path,
-	       SilcSFTPAttrCallback callback,
-	       void *callback_context)
+void memfs_lstat(void *context, SilcSFTP sftp,
+		 const char *path,
+		 SilcSFTPAttrCallback callback,
+		 void *callback_context)
 {
   MemFS fs = (MemFS)context;
   MemFSEntry entry;
@@ -936,7 +936,7 @@
     path = (const char *)DIR_SEPARATOR;
 
   /* Find such directory */
-  entry = mem_find_entry_path(fs->root, path);
+  entry = memfs_find_entry_path(fs->root, path);
   if (!entry) {
     (*callback)(sftp, SILC_SFTP_STATUS_NO_SUCH_FILE, NULL, callback_context);
     return;
@@ -983,10 +983,10 @@
   silc_sftp_attr_free(attrs);
 }
 
-void mem_fstat(void *context, SilcSFTP sftp,
-	       SilcSFTPHandle handle,
-	       SilcSFTPAttrCallback callback,
-	       void *callback_context)
+void memfs_fstat(void *context, SilcSFTP sftp,
+		 SilcSFTPHandle handle,
+		 SilcSFTPAttrCallback callback,
+		 void *callback_context)
 {
   MemFSFileHandle h = (MemFSFileHandle)handle;
   SilcSFTPAttributes attrs;
@@ -1026,53 +1026,53 @@
   silc_sftp_attr_free(attrs);
 }
 
-void mem_setstat(void *context, SilcSFTP sftp,
-		 const char *path,
-		 SilcSFTPAttributes attrs,
-		 SilcSFTPStatusCallback callback,
-		 void *callback_context)
+void memfs_setstat(void *context, SilcSFTP sftp,
+		   const char *path,
+		   SilcSFTPAttributes attrs,
+		   SilcSFTPStatusCallback callback,
+		   void *callback_context)
 {
   /* Setstat is not supported */
   (*callback)(sftp, SILC_SFTP_STATUS_OP_UNSUPPORTED, NULL, NULL,
 	      callback_context);
 }
 
-void mem_fsetstat(void *context, SilcSFTP sftp,
-		  SilcSFTPHandle handle,
-		  SilcSFTPAttributes attrs,
-		  SilcSFTPStatusCallback callback,
-		  void *callback_context)
+void memfs_fsetstat(void *context, SilcSFTP sftp,
+		    SilcSFTPHandle handle,
+		    SilcSFTPAttributes attrs,
+		    SilcSFTPStatusCallback callback,
+		    void *callback_context)
 {
   /* Fsetstat is not supported */
   (*callback)(sftp, SILC_SFTP_STATUS_OP_UNSUPPORTED, NULL, NULL,
 	      callback_context);
 }
 
-void mem_readlink(void *context, SilcSFTP sftp,
-		  const char *path,
-		  SilcSFTPNameCallback callback,
-		  void *callback_context)
+void memfs_readlink(void *context, SilcSFTP sftp,
+		    const char *path,
+		    SilcSFTPNameCallback callback,
+		    void *callback_context)
 {
   /* Readlink is not supported */
   (*callback)(sftp, SILC_SFTP_STATUS_OP_UNSUPPORTED, NULL,
 	      callback_context);
 }
 
-void mem_symlink(void *context, SilcSFTP sftp,
-		 const char *linkpath,
-		 const char *targetpath,
-		 SilcSFTPStatusCallback callback,
-		 void *callback_context)
+void memfs_symlink(void *context, SilcSFTP sftp,
+		   const char *linkpath,
+		   const char *targetpath,
+		   SilcSFTPStatusCallback callback,
+		   void *callback_context)
 {
   /* Symlink is not supported */
   (*callback)(sftp, SILC_SFTP_STATUS_OP_UNSUPPORTED, NULL, NULL,
 	      callback_context);
 }
 
-void mem_realpath(void *context, SilcSFTP sftp,
-		  const char *path,
-		  SilcSFTPNameCallback callback,
-		  void *callback_context)
+void memfs_realpath(void *context, SilcSFTP sftp,
+		    const char *path,
+		    SilcSFTPNameCallback callback,
+		    void *callback_context)
 {
   MemFS fs = (MemFS)context;
   char *realpath;
@@ -1081,7 +1081,7 @@
   if (!path || !strlen(path))
     path = (const char *)DIR_SEPARATOR;
 
-  realpath = mem_expand_path(fs->root, path);
+  realpath = memfs_expand_path(fs->root, path);
   if (!realpath)
     goto fail;
 
@@ -1115,12 +1115,12 @@
   (*callback)(sftp, SILC_SFTP_STATUS_FAILURE, NULL, callback_context);
 }
 
-void mem_extended(void *context, SilcSFTP sftp,
-		  const char *request,
-		  const unsigned char *data,
-		  SilcUInt32 data_len,
-		  SilcSFTPExtendedCallback callback,
-		  void *callback_context)
+void memfs_extended(void *context, SilcSFTP sftp,
+		    const char *request,
+		    const unsigned char *data,
+		    SilcUInt32 data_len,
+		    SilcSFTPExtendedCallback callback,
+		    void *callback_context)
 {
   /* Extended is not supported */
   (*callback)(sftp, SILC_SFTP_STATUS_OP_UNSUPPORTED, NULL, 0,
@@ -1128,25 +1128,25 @@
 }
 
 const struct SilcSFTPFilesystemOpsStruct silc_sftp_fs_memory = {
-  mem_get_handle,
-  mem_encode_handle,
-  mem_open,
-  mem_close,
-  mem_read,
-  mem_write,
-  mem_remove,
-  mem_rename,
-  mem_mkdir,
-  mem_rmdir,
-  mem_opendir,
-  mem_readdir,
-  mem_stat,
-  mem_lstat,
-  mem_fstat,
-  mem_setstat,
-  mem_fsetstat,
-  mem_readlink,
-  mem_symlink,
-  mem_realpath,
-  mem_extended
+  memfs_get_handle,
+  memfs_encode_handle,
+  memfs_open,
+  memfs_close,
+  memfs_read,
+  memfs_write,
+  memfs_remove,
+  memfs_rename,
+  memfs_mkdir,
+  memfs_rmdir,
+  memfs_opendir,
+  memfs_readdir,
+  memfs_stat,
+  memfs_lstat,
+  memfs_fstat,
+  memfs_setstat,
+  memfs_fsetstat,
+  memfs_readlink,
+  memfs_symlink,
+  memfs_realpath,
+  memfs_extended
 };

Modified: silc-client/branches/upstream/current/lib/silcske/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcske/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcske/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silcske/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silcske/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcske/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silcske/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcske/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcske/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcske/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silcske/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcske/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -221,6 +221,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcske/silcconnauth.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcske/silcconnauth.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcske/silcconnauth.c (original)
+++ silc-client/branches/upstream/current/lib/silcske/silcconnauth.c Fri Jun 29 13:50:15 2007
@@ -357,7 +357,8 @@
     SILC_LOG_DEBUG(("Authentication successful"));
     connauth->success = TRUE;
   } else {
-    SILC_LOG_DEBUG(("Authentication failed"));
+    SILC_LOG_DEBUG(("Authentication failed, packet %s received",
+		    silc_get_packet_name(connauth->packet->type)));
     connauth->success = FALSE;
   }
   silc_packet_free(connauth->packet);
@@ -486,7 +487,8 @@
 
   if (connauth->aborted) {
     /** Aborted */
-    silc_packet_free(connauth->packet);
+    if (connauth->packet)
+      silc_packet_free(connauth->packet);
     silc_fsm_next(fsm, silc_connauth_st_responder_failure);
     return SILC_FSM_CONTINUE;
   }

Modified: silc-client/branches/upstream/current/lib/silcske/silcske.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcske/silcske.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcske/silcske.c (original)
+++ silc-client/branches/upstream/current/lib/silcske/silcske.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: silcske.c,v 1.92 2007/05/01 16:49:42 priikone Exp $ */
+/* $Id: silcske.c,v 1.92.2.1 2007/06/08 20:37:54 priikone Exp $ */
 
 #include "silc.h"
 #include "silcske.h"
@@ -2550,9 +2550,14 @@
 			 &hmac_send, NULL, NULL)) {
     /** Cannot get keys */
     ske->status = SILC_SKE_STATUS_ERROR;
+    ske->prop->cipher = NULL;
+    ske->prop->hmac = NULL;
     silc_fsm_next(fsm, silc_ske_st_initiator_error);
     return SILC_FSM_CONTINUE;
   }
+
+  ske->prop->cipher = NULL;
+  ske->prop->hmac = NULL;
 
   /* Set the new keys into use.  This will also send REKEY_DONE packet.  Any
      packet sent after this call will be protected with the new keys. */
@@ -2561,6 +2566,8 @@
     /** Cannot set keys */
     SILC_LOG_DEBUG(("Cannot set new keys, error sending REKEY_DONE"));
     ske->status = SILC_SKE_STATUS_ERROR;
+    silc_cipher_free(send_key);
+    silc_hmac_free(hmac_send);
     silc_fsm_next(fsm, silc_ske_st_initiator_error);
     return SILC_FSM_CONTINUE;
   }
@@ -2597,6 +2604,8 @@
 			 NULL, &hmac_receive, NULL)) {
     /** Cannot get keys */
     ske->status = SILC_SKE_STATUS_ERROR;
+    ske->prop->cipher = NULL;
+    ske->prop->hmac = NULL;
     silc_fsm_next(fsm, silc_ske_st_initiator_error);
     return SILC_FSM_CONTINUE;
   }
@@ -2608,6 +2617,8 @@
     /** Cannot set keys */
     SILC_LOG_DEBUG(("Cannot set new keys"));
     ske->status = SILC_SKE_STATUS_ERROR;
+    silc_cipher_free(receive_key);
+    silc_hmac_free(hmac_receive);
     silc_fsm_next(fsm, silc_ske_st_initiator_error);
     return SILC_FSM_CONTINUE;
   }
@@ -2619,6 +2630,8 @@
   if (!rekey) {
     /** No memory */
     ske->status = SILC_SKE_STATUS_OUT_OF_MEMORY;
+    ske->prop->cipher = NULL;
+    ske->prop->hmac = NULL;
     silc_fsm_next(fsm, silc_ske_st_initiator_error);
     return SILC_FSM_CONTINUE;
   }
@@ -2695,7 +2708,6 @@
   /* Add rekey exchange timeout */
   silc_schedule_task_add_timeout(ske->schedule, silc_ske_timeout,
 				 ske, 30, 0);
-
 
   silc_fsm_next(fsm, silc_ske_st_rekey_responder_start);
 
@@ -2812,9 +2824,14 @@
 			 &hmac_send, NULL, NULL)) {
     /** Cannot get keys */
     ske->status = SILC_SKE_STATUS_ERROR;
+    ske->prop->cipher = NULL;
+    ske->prop->hmac = NULL;
     silc_fsm_next(fsm, silc_ske_st_responder_error);
     return SILC_FSM_CONTINUE;
   }
+
+  ske->prop->cipher = NULL;
+  ske->prop->hmac = NULL;
 
   /* Set the new keys into use.  This will also send REKEY_DONE packet.  Any
      packet sent after this call will be protected with the new keys. */
@@ -2823,6 +2840,8 @@
     /** Cannot set keys */
     SILC_LOG_DEBUG(("Cannot set new keys, error sending REKEY_DONE"));
     ske->status = SILC_SKE_STATUS_ERROR;
+    silc_cipher_free(send_key);
+    silc_hmac_free(hmac_send);
     silc_fsm_next(fsm, silc_ske_st_responder_error);
     return SILC_FSM_CONTINUE;
   }
@@ -2859,6 +2878,8 @@
 			 NULL, &hmac_receive, NULL)) {
     /** Cannot get keys */
     ske->status = SILC_SKE_STATUS_ERROR;
+    ske->prop->cipher = NULL;
+    ske->prop->hmac = NULL;
     silc_fsm_next(fsm, silc_ske_st_responder_error);
     return SILC_FSM_CONTINUE;
   }
@@ -2870,6 +2891,10 @@
     /** Cannot set keys */
     SILC_LOG_DEBUG(("Cannot set new keys"));
     ske->status = SILC_SKE_STATUS_ERROR;
+    ske->prop->cipher = NULL;
+    ske->prop->hmac = NULL;
+    silc_cipher_free(receive_key);
+    silc_hmac_free(hmac_receive);
     silc_fsm_next(fsm, silc_ske_st_responder_error);
     return SILC_FSM_CONTINUE;
   }
@@ -2881,6 +2906,8 @@
   if (!rekey) {
     /** No memory */
     ske->status = SILC_SKE_STATUS_OUT_OF_MEMORY;
+    ske->prop->cipher = NULL;
+    ske->prop->hmac = NULL;
     silc_fsm_next(fsm, silc_ske_st_responder_error);
     return SILC_FSM_CONTINUE;
   }

Modified: silc-client/branches/upstream/current/lib/silcskr/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcskr/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcskr/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silcskr/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silcskr/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcskr/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silcskr/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcskr/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcskr/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcskr/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silcskr/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcskr/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -220,6 +220,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcskr/silcskr.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcskr/silcskr.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcskr/silcskr.c (original)
+++ silc-client/branches/upstream/current/lib/silcskr/silcskr.c Fri Jun 29 13:50:15 2007
@@ -51,16 +51,16 @@
 
 #if defined(SILC_DEBUG)
 static const char *find_name[] = {
-  "PKCS TYPE",
-  "USERNAME",
-  "HOST",
-  "REALNAME",
-  "EMAIL",
-  "ORG",
-  "COUNTRY",
+  "PKCS TYPE ",
+  "USERNAME  ",
+  "HOST      ",
+  "REALNAME  ",
+  "EMAIL     ",
+  "ORG       ",
+  "COUNTRY   ",
   "PUBLIC KEY",
-  "CONTEXT",
-  "USAGE",
+  "CONTEXT   ",
+  "USAGE     ",
   NULL
 };
 #endif /* SILC_DEBUG */
@@ -78,7 +78,7 @@
   case SILC_SKR_FIND_PKCS_TYPE:
   case SILC_SKR_FIND_USAGE:
     silc_snprintf(retbuf, retbuf_size, "[%s] [%d]", find_name[type],
-	     (int)SILC_PTR_TO_32(data));
+		  (int)SILC_PTR_TO_32(data));
     break;
 
   case SILC_SKR_FIND_PUBLIC_KEY:
@@ -88,7 +88,7 @@
 
   default:
     silc_snprintf(retbuf, retbuf_size, "[%s] [%s]", find_name[type],
-	     (char *)data);
+		  (char *)data);
   }
 }
 #endif /* SILC_DEBUG */
@@ -270,6 +270,13 @@
 				   void *type_data, SilcSKRKeyInternal key)
 {
   SilcSKREntry entry;
+
+#if defined(SILC_DEBUG)
+  char tmp[256];
+  memset(tmp, 0, sizeof(tmp));
+  silc_skr_type_string(type, type_data, tmp, sizeof(tmp) - 1);
+  SILC_LOG_DEBUG(("Search constraint %s", tmp));
+#endif /* SILC_DEBUG */
 
   entry = silc_calloc(1, sizeof(*entry));
   if (!entry)
@@ -363,12 +370,16 @@
   SilcSKRStatus status = SILC_SKR_ERROR;
   SilcPublicKeyIdentifier ident;
   SilcSILCPublicKey silc_pubkey;
+#if defined(SILC_DEBUG)
+  char tmp[256];
+#endif /* SILC_DEBUG */
 
   /* Get the SILC public key */
   silc_pubkey = silc_pkcs_get_context(SILC_PKCS_SILC, public_key);
   ident = &silc_pubkey->identifier;
 
-  SILC_LOG_DEBUG(("Adding SILC public key [%s]", ident->username));
+  SILC_LOG_DEBUG(("Adding SILC public key %p [%s], context %p",
+		  public_key, ident->username, key_context));
 
   silc_mutex_lock(skr->lock);
 
@@ -390,6 +401,12 @@
   key->key.usage = usage;
   key->key.key = public_key;
   key->key.key_context = key_context;
+
+#if defined(SILC_DEBUG)
+  silc_skr_type_string(SILC_SKR_FIND_USAGE, SILC_32_TO_PTR(usage),
+		       tmp, sizeof(tmp) - 1);
+  SILC_LOG_DEBUG((" Search constraint %s", tmp));
+#endif /* SILC_DEBUG */
 
   /* Add key specifics */
 
@@ -854,6 +871,8 @@
 
 SilcBool silc_skr_find_set_context(SilcSKRFind find, void *context)
 {
+  if (!context)
+    return TRUE;
   return silc_hash_table_add(find->constr,
 			     SILC_32_TO_PTR(SILC_SKR_FIND_CONTEXT), context);
 }
@@ -882,6 +901,9 @@
   SilcHashTableList htl;
   SilcDList list, results = NULL;
   void *type, *ctx, *usage = NULL;
+#if defined(SILC_DEBUG)
+  char tmp[256];
+#endif /* SILC_DEBUG */
 
   SILC_LOG_DEBUG(("Finding key from repository"));
 
@@ -894,20 +916,27 @@
   silc_hash_table_find(find->constr, SILC_32_TO_PTR(SILC_SKR_FIND_USAGE),
 		       NULL, &usage);
 
+#if defined(SILC_DEBUG)
+  if (usage) {
+    memset(tmp, 0, sizeof(tmp));
+    silc_skr_type_string(SILC_SKR_FIND_USAGE, usage, tmp, sizeof(tmp) - 1);
+    SILC_LOG_DEBUG(("Finding key by %s", tmp));
+  }
+#endif /* SILC_DEBUG */
+
   silc_hash_table_list(find->constr, &htl);
   while (silc_hash_table_get(&htl, &type, &ctx)) {
 
+    /* SILC_SKR_FIND_USAGE is handled separately while searching the keys. */
+    if ((SilcSKRFindType)SILC_32_TO_PTR(type) == SILC_SKR_FIND_USAGE)
+      continue;
+
 #if defined(SILC_DEBUG)
-    char tmp[256];
     memset(tmp, 0, sizeof(tmp));
     silc_skr_type_string((SilcSKRFindType)SILC_32_TO_PTR(type),
 			 ctx, tmp, sizeof(tmp) - 1);
     SILC_LOG_DEBUG(("Finding key by %s", tmp));
 #endif /* SILC_DEBUG */
-
-    /* SILC_SKR_FIND_USAGE is handled separately while searching the keys. */
-    if ((SilcSKRFindType)SILC_32_TO_PTR(type) == SILC_SKR_FIND_USAGE)
-      continue;
 
     /* Find entries by this search constraint */
     if (!silc_skr_find_entry(skr, &status,

Modified: silc-client/branches/upstream/current/lib/silcutil/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silcutil/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silcutil/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcutil/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silcutil/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcutil/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silcutil/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcutil/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:46 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -234,6 +234,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcutil/silcatomic.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcatomic.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcatomic.h (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcatomic.h Fri Jun 29 13:50:15 2007
@@ -298,10 +298,10 @@
 }
 #endif /* SILC_ATOMIC_MUTEX */
 
-SILC_ATOMIC_INIT(8, 8, SilcUInt8);
-SILC_ATOMIC_INIT(16, 16, SilcUInt16);
-SILC_ATOMIC_INIT(32, 32, SilcUInt32);
-SILC_ATOMIC_INIT(_pointer, Pointer, void *);
+SILC_ATOMIC_INIT(8, 8, SilcUInt8)
+SILC_ATOMIC_INIT(16, 16, SilcUInt16)
+SILC_ATOMIC_INIT(32, 32, SilcUInt32)
+SILC_ATOMIC_INIT(_pointer, Pointer, void *)
 
 /****f* silcutil/SilcAtomicAPI/silc_atomic_uninit32
  *
@@ -372,13 +372,14 @@
 #define SILC_ATOMIC_UNINIT(bits, t)					\
 SILC_ATOMIC_UNINIT_F(bits, t)						\
 {									\
+  memset(atomic, 0, sizeof(*atomic));					\
 }
 #endif /* SILC_ATOMIC_MUTEX */
 
-SILC_ATOMIC_UNINIT(8, 8);
-SILC_ATOMIC_UNINIT(16, 16);
-SILC_ATOMIC_UNINIT(32, 32);
-SILC_ATOMIC_UNINIT(_pointer, Pointer);
+SILC_ATOMIC_UNINIT(8, 8)
+SILC_ATOMIC_UNINIT(16, 16)
+SILC_ATOMIC_UNINIT(32, 32)
+SILC_ATOMIC_UNINIT(_pointer, Pointer)
 
 /****f* silcutil/SilcAtomicAPI/silc_atomic_set_int32
  *
@@ -478,9 +479,9 @@
 }
 #endif /* !SILC_THREADS */
 
-SILC_ATOMIC_SET_INT(8, "b", "b");
-SILC_ATOMIC_SET_INT(16, "w", "w");
-SILC_ATOMIC_SET_INT(32, "l", "");
+SILC_ATOMIC_SET_INT(8, "b", "b")
+SILC_ATOMIC_SET_INT(16, "w", "w")
+SILC_ATOMIC_SET_INT(32, "l", "")
 
 /****f* silcutil/SilcAtomicAPI/silc_atomic_set_pointer
  *
@@ -617,9 +618,9 @@
 }
 #endif /* !SILC_THREADS */
 
-SILC_ATOMIC_GET_INT(8);
-SILC_ATOMIC_GET_INT(16);
-SILC_ATOMIC_GET_INT(32);
+SILC_ATOMIC_GET_INT(8)
+SILC_ATOMIC_GET_INT(16)
+SILC_ATOMIC_GET_INT(32)
 
 /****f* silcutil/SilcAtomicAPI/silc_atomic_get_pointer
  *
@@ -789,9 +790,9 @@
 }
 #endif /* !SILC_THREADS */
 
-SILC_ATOMIC_ADD_INT(8, "b");
-SILC_ATOMIC_ADD_INT(16, "w");
-SILC_ATOMIC_ADD_INT(32, "l");
+SILC_ATOMIC_ADD_INT(8, "b")
+SILC_ATOMIC_ADD_INT(16, "w")
+SILC_ATOMIC_ADD_INT(32, "l")
 
 /****f* silcutil/SilcAtomicAPI/silc_atomic_sub_int32
  *
@@ -941,9 +942,9 @@
 }
 #endif /* !SILC_THREADS */
 
-SILC_ATOMIC_INC(8, "b");
-SILC_ATOMIC_INC(16, "w");
-SILC_ATOMIC_INC(32, "l");
+SILC_ATOMIC_INC(8, "b")
+SILC_ATOMIC_INC(16, "w")
+SILC_ATOMIC_INC(32, "l")
 
 /****f* silcutil/SilcAtomicAPI/silc_atomic_dec32
  *
@@ -1047,9 +1048,9 @@
 }
 #endif /* !SILC_THREADS */
 
-SILC_ATOMIC_DEC(8, "b");
-SILC_ATOMIC_DEC(16, "w");
-SILC_ATOMIC_DEC(32, "l");
+SILC_ATOMIC_DEC(8, "b")
+SILC_ATOMIC_DEC(16, "w")
+SILC_ATOMIC_DEC(32, "l")
 
 /****f* silcutil/SilcAtomicAPI/silc_atomic_cas32
  *
@@ -1173,9 +1174,9 @@
 }
 #endif /* !SILC_THREADS */
 
-SILC_ATOMIC_CAS(8, "b");
-SILC_ATOMIC_CAS(16, "w");
-SILC_ATOMIC_CAS(32, "l");
+SILC_ATOMIC_CAS(8, "b")
+SILC_ATOMIC_CAS(16, "w")
+SILC_ATOMIC_CAS(32, "l")
 
 /****f* silcutil/SilcAtomicAPI/silc_atomic_cas_pointer
  *

Modified: silc-client/branches/upstream/current/lib/silcutil/silcbuffer.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcbuffer.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcbuffer.h (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcbuffer.h Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: silcbuffer.h,v 1.34 2007/05/16 16:02:29 priikone Exp $ */
+/* $Id: silcbuffer.h,v 1.34.2.1 2007/06/17 10:16:39 priikone Exp $ */
 
 /****h* silcutil/SILC Buffer Interface
  *
@@ -977,7 +977,7 @@
     return NULL;
 
   /* Allocate the actual data area */
-  sb->head = (unsigned char *)silc_smalloc_ua(stack, len);
+  sb->head = (unsigned char *)silc_smalloc(stack, len);
   if (silc_unlikely(!sb->head))
     return NULL;
 
@@ -1054,12 +1054,12 @@
 
   hlen = silc_buffer_headlen(sb);
   dlen = silc_buffer_len(sb);
-  h = (unsigned char *)silc_srealloc_ua(stack, silc_buffer_truelen(sb),
-					sb->head, newsize);
+  h = (unsigned char *)silc_srealloc(stack, silc_buffer_truelen(sb),
+				     sb->head, newsize);
   if (!h) {
     /* Do slow and stack wasting realloc.  The old sb->head is lost and
        is freed eventually. */
-    h = (unsigned char *)silc_smalloc_ua(stack, newsize);
+    h = (unsigned char *)silc_smalloc(stack, newsize);
     if (silc_unlikely(!h))
       return NULL;
     memcpy(h, sb->head, silc_buffer_truelen(sb));

Modified: silc-client/branches/upstream/current/lib/silcutil/silcbuffmt.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcbuffmt.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcbuffmt.c (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcbuffmt.c Fri Jun 29 13:50:15 2007
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone at silcnet.org>
 
-  Copyright (C) 1997 - 2006 Pekka Riikonen
+  Copyright (C) 1997 - 2007 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: silcbuffmt.c,v 1.36 2007/04/22 18:23:16 priikone Exp $ */
+/* $Id: silcbuffmt.c,v 1.36.2.1 2007/06/17 10:16:39 priikone Exp $ */
 
 #include "silc.h"
 
@@ -747,8 +747,8 @@
       goto ok;
 
     slen = strlen(string);
-    d = silc_srealloc_ua(stack, len + 1, dst->head,
-			 sizeof(*dst->head) * (slen + len + 1));
+    d = silc_srealloc(stack, len + 1, dst->head,
+		      sizeof(*dst->head) * (slen + len + 1));
     if (silc_unlikely(!d))
       return -1;
     dst->head = d;

Modified: silc-client/branches/upstream/current/lib/silcutil/silcdlist.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcdlist.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcdlist.h (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcdlist.h Fri Jun 29 13:50:15 2007
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone at silcnet.org>
 
-  Copyright (C) 2000 - 2006 Pekka Riikonen
+  Copyright (C) 2000 - 2007 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -50,14 +50,12 @@
  *    Application defines this object and adds contexts to this list with
  *    Dynamic List Interface functions.
  *
- * SOURCE
- */
+ ***/
 typedef struct SilcDListStruct {
   SilcList list;
   void *current;
   void *prev;
 } *SilcDList;
-/***/
 
 /* SilcDListEntry structure, one entry in the list. This MUST NOT be used
    directly by the application. */
@@ -239,22 +237,22 @@
  * SYNOPSIS
  *
  *    static inline
- *    void silc_dlist_del(SilcDList list, void *context);
- *
- * DESCRIPTION
- *
- *    Remove entry from the list. Returns < 0 on error, 0 otherwise.
- *
- ***/
-
-static inline
-void silc_dlist_del(SilcDList list, void *context)
+ *    void silc_dlist_del(SilcDList list, void *entry);
+ *
+ * DESCRIPTION
+ *
+ *    Remove entry from the list.
+ *
+ ***/
+
+static inline
+void silc_dlist_del(SilcDList list, void *entry)
 {
   SilcDListEntry e;
 
   silc_list_start(list->list);
   while ((e = (SilcDListEntry)silc_list_get(list->list)) != SILC_LIST_END) {
-    if (e->context == context) {
+    if (e->context == entry) {
       silc_list_del(list->list, e);
 #if defined(SILC_DEBUG)
       memset(e, 'F', sizeof(*e));

Modified: silc-client/branches/upstream/current/lib/silcutil/silcfsm.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcfsm.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcfsm.c (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcfsm.c Fri Jun 29 13:50:15 2007
@@ -317,10 +317,6 @@
 
   SILC_ASSERT(!f->finished);
 
-  /* Machine must not have active threads */
-  if (!f->thread && silc_atomic_get_int32(&f->u.m.threads))
-    assert(silc_atomic_get_int32(&f->u.m.threads) == 0);
-
   f->started = FALSE;
   f->finished = TRUE;
 
@@ -484,6 +480,9 @@
       fsm->destructor(fsm, fsm->fsm_context, fsm->destructor_context);
 
   } else {
+    /* Machine must not have active threads */
+    assert(silc_atomic_get_int32(&fsm->u.m.threads) == 0);
+
     if (fsm->u.m.lock) {
       silc_mutex_free(fsm->u.m.lock);
       fsm->u.m.lock = NULL;

Modified: silc-client/branches/upstream/current/lib/silcutil/silclog.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silclog.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silclog.c (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silclog.c Fri Jun 29 13:50:15 2007
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone at silcnet.org>
 
-  Copyright (C) 1997 - 2006 Pekka Riikonen
+  Copyright (C) 1997 - 2007 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: silclog.c,v 1.44 2007/05/13 15:31:32 priikone Exp $ */
+/* $Id: silclog.c,v 1.44.2.2 2007/06/08 15:45:20 priikone Exp $ */
 
 #include "silc.h"
 
@@ -486,6 +486,8 @@
 void silc_log_output_debug(char *file, const char *function,
 			   int line, char *string)
 {
+  SilcTimeStruct curtime;
+
 #ifndef SILC_SYMBIAN
   if (!silclog.debug)
     goto end;
@@ -500,6 +502,8 @@
       goto end;
   }
 #endif /* !SILC_SYMBIAN */
+
+  silc_time_value(0, &curtime);
 
 #ifdef SILC_WIN32
   if (strrchr(function, '\\'))
@@ -509,10 +513,12 @@
 #ifdef SILC_SYMBIAN
   silc_symbian_debug(function, line, string);
 #else
-  fprintf(stderr, "%s:%d: %s\n", function, line, string);
+  fprintf(stderr, "%02d:%02d:%02d %s:%d: %s\n", curtime.hour,
+	  curtime.minute, curtime.second, function, line,
+	  string);
   fflush(stderr);
 #endif /* SILC_SYMBIAN */
-  
+
  end:
   silc_free(string);
 }

Modified: silc-client/branches/upstream/current/lib/silcutil/silcmime.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcmime.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcmime.c (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcmime.c Fri Jun 29 13:50:15 2007
@@ -198,6 +198,7 @@
   if (field && strstr(field, "multipart")) {
     char b[1024];
     SilcMime p;
+    unsigned int len;
 
     mime->multiparts = silc_dlist_init();
     if (!mime->multiparts)
@@ -213,7 +214,10 @@
     if (!strchr(field, ';'))
       goto err;
     memset(b, 0, sizeof(b));
-    strncat(b, value, strchr(field, ';') - value);
+    len = (unsigned int)(strchr(field, ';') - value);
+    if (len > sizeof(b) - 1)
+      goto err;
+    strncpy(b, value, len);
     if (strchr(b, '"'))
       *strchr(b, '"') = '\0';
     mime->multitype = silc_memdup(b, strlen(b));

Modified: silc-client/branches/upstream/current/lib/silcutil/silcmutex.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcmutex.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcmutex.h (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcmutex.h Fri Jun 29 13:50:15 2007
@@ -190,7 +190,7 @@
  *    is locked by a writer the current thread will block until the other
  *    thread has issued silc_rwlock_unlock for the `rwlock'.  This function
  *    may be called multiple times to acquire the read lock.  There must be
- *    same amount of silc_rwlock_unlock calls.  If `rwlock' is NULL this
+ *    same number of silc_rwlock_unlock calls.  If `rwlock' is NULL this
  *    function has no effect.
  *
  ***/
@@ -207,7 +207,9 @@
  *    Acquires write lock of the read/write lock `rwlock'.  If the `rwlock'
  *    is locked by a writer or a reader the current thread will block until
  *    the other thread(s) have issued silc_rwlock_unlock for the `rwlock'.
- *    If `rwlock' is NULL this function has no effect.
+ *    A thread may acquire the write lock only once.  A deadlock may occur
+ *    if thread attempts to acquire the write lock when it has already done
+ *    so.  If `rwlock' is NULL this function has no effect.
  *
  ***/
 void silc_rwlock_wrlock(SilcRwLock rwlock);

Modified: silc-client/branches/upstream/current/lib/silcutil/silcnet.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcnet.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcnet.h (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcnet.h Fri Jun 29 13:50:15 2007
@@ -118,7 +118,7 @@
  *
  *    This function creates TCP listener.  This is used to create network
  *    listener for incoming connections, and `callback' will be called
- *    everytime new connection is received.  If `local_ip_addr' is NULL any
+ *    everytime new connection is received.  If `local_ip_addr' is NULL 'any'
  *    address is used.  If provided it can be used bind the listener to
  *    `local_ip_count' many IP addresses provided in `local_ip_addr' table.
  *    On success returns the SilcNetListener context, or NULL on error.
@@ -504,7 +504,7 @@
  * SYNOPSIS
  *
  *    SilcBool silc_net_gethostbyname(const char *name, SilcBool prefer_ipv6,
- *                                char *address, SilcUInt32 address_len);
+ *                                    char *address, SilcUInt32 address_len);
  *
  * DESCRIPTION
  *
@@ -553,9 +553,9 @@
  * SYNOPSIS
  *
  *   SilcBool silc_net_gethostbyaddr(const char *addr, char *name,
- *                               SilcUInt32 name_len);
- *
- * DESCRIPTION
+ *                                   SilcUInt32 name_len);
+ *
+x * DESCRIPTION
  *
  *    Resolves the hostname for the IP address indicated by the `addr'
  *    This returns TRUE and the resolved hostname to the `name' buffer,

Modified: silc-client/branches/upstream/current/lib/silcutil/silcschedule.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcschedule.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcschedule.c (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcschedule.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: silcschedule.c,v 1.74 2007/05/17 14:09:35 priikone Exp $ */
+/* $Id: silcschedule.c,v 1.74.2.1 2007/06/06 14:32:17 priikone Exp $ */
 
 #include "silc.h"
 
@@ -453,6 +453,11 @@
       /* There is some data available now */
       SILC_LOG_DEBUG(("Running fd tasks"));
       silc_schedule_dispatch_fd(schedule);
+
+      /* If timeout was very short, dispatch also timeout tasks */
+      if (schedule->has_timeout && schedule->timeout.tv_sec == 0 &&
+	  schedule->timeout.tv_usec < 50000)
+	silc_schedule_dispatch_timeout(schedule, FALSE);
       continue;
 
     } else {
@@ -521,6 +526,15 @@
 void *silc_schedule_get_context(SilcSchedule schedule)
 {
   return schedule->app_context;
+}
+
+/* Set notify callback */
+
+void silc_schedule_set_notify(SilcSchedule schedule,
+			      SilcTaskNotifyCb notify, void *context)
+{
+  schedule->notify = notify;
+  schedule->notify_context = context;
 }
 
 /* Add new task to the scheduler */
@@ -587,6 +601,11 @@
 
     task = (SilcTask)ttask;
 
+    /* Call notify callback */
+    if (schedule->notify)
+      schedule->notify(schedule, TRUE, task, FALSE, 0, 0, seconds, useconds,
+		       schedule->notify_context);
+
   } else if (silc_likely(type == SILC_TASK_FD)) {
     SilcTaskFd ftask;
 
@@ -640,6 +659,11 @@
 
     task = (SilcTask)ftask;
 
+    /* Call notify callback */
+    if (schedule->notify)
+      schedule->notify(schedule, TRUE, task, TRUE, ftask->fd,
+		       SILC_TASK_READ, 0, 0, schedule->notify_context);
+
   } else if (silc_unlikely(type == SILC_TASK_SIGNAL)) {
     SILC_SCHEDULE_UNLOCK(schedule);
     schedule_ops.signal_register(schedule, schedule->internal, fd,
@@ -674,15 +698,27 @@
 
     /* Delete from fd queue */
     silc_hash_table_list(schedule->fd_queue, &htl);
-    while (silc_hash_table_get(&htl, NULL, (void *)&task))
+    while (silc_hash_table_get(&htl, NULL, (void *)&task)) {
       task->valid = FALSE;
+
+      /* Call notify callback */
+      if (schedule->notify)
+	schedule->notify(schedule, FALSE, task, TRUE,
+			 ((SilcTaskFd)task)->fd, 0, 0, 0,
+			 schedule->notify_context);
+    }
     silc_hash_table_list_reset(&htl);
 
     /* Delete from timeout queue */
     silc_list_start(schedule->timeout_queue);
-    while ((task = (SilcTask)silc_list_get(schedule->timeout_queue))
-	   != SILC_LIST_END)
+    while ((task = (SilcTask)silc_list_get(schedule->timeout_queue))) {
       task->valid = FALSE;
+
+      /* Call notify callback */
+      if (schedule->notify)
+	schedule->notify(schedule, FALSE, task, FALSE, 0, 0, 0, 0,
+			 schedule->notify_context);
+    }
 
     SILC_SCHEDULE_UNLOCK(schedule);
     return TRUE;
@@ -691,6 +727,11 @@
   SILC_LOG_DEBUG(("Unregistering task %p", task));
   SILC_SCHEDULE_LOCK(schedule);
   task->valid = FALSE;
+
+  /* Call notify callback */
+  if (schedule->notify)
+    schedule->notify(schedule, FALSE, task, !task->type, 0, 0, 0, 0,
+		     schedule->notify_context);
   SILC_SCHEDULE_UNLOCK(schedule);
 
   return TRUE;
@@ -713,6 +754,11 @@
 				       (void *)&task))) {
     SILC_LOG_DEBUG(("Deleting task %p", task));
     task->valid = FALSE;
+
+    /* Call notify callback */
+    if (schedule->notify)
+      schedule->notify(schedule, FALSE, task, TRUE, fd, 0, 0, 0,
+		       schedule->notify_context);
     ret = TRUE;
   }
 
@@ -746,6 +792,12 @@
   while (silc_hash_table_get(&htl, NULL, (void *)&task)) {
     if (task->callback == callback) {
       task->valid = FALSE;
+
+      /* Call notify callback */
+      if (schedule->notify)
+	schedule->notify(schedule, FALSE, task, TRUE,
+			 ((SilcTaskFd)task)->fd, 0, 0, 0,
+			 schedule->notify_context);
       ret = TRUE;
     }
   }
@@ -757,6 +809,11 @@
   while ((task = (SilcTask)silc_list_get(list))) {
     if (task->callback == callback) {
       task->valid = FALSE;
+
+      /* Call notify callback */
+      if (schedule->notify)
+	schedule->notify(schedule, FALSE, task, FALSE, 0, 0, 0, 0,
+			 schedule->notify_context);
       ret = TRUE;
     }
   }
@@ -785,6 +842,12 @@
   while (silc_hash_table_get(&htl, NULL, (void *)&task)) {
     if (task->context == context) {
       task->valid = FALSE;
+
+      /* Call notify callback */
+      if (schedule->notify)
+	schedule->notify(schedule, FALSE, task, TRUE,
+			 ((SilcTaskFd)task)->fd, 0, 0, 0,
+			 schedule->notify_context);
       ret = TRUE;
     }
   }
@@ -795,8 +858,13 @@
   silc_list_start(list);
   while ((task = (SilcTask)silc_list_get(list))) {
     if (task->context == context) {
+      task->valid = FALSE;
+
+      /* Call notify callback */
+      if (schedule->notify)
+	schedule->notify(schedule, FALSE, task, FALSE, 0, 0, 0, 0,
+			 schedule->notify_context);
       ret = TRUE;
-      task->valid = FALSE;
     }
   }
 
@@ -829,6 +897,11 @@
   while ((task = (SilcTask)silc_list_get(list))) {
     if (task->callback == callback && task->context == context) {
       task->valid = FALSE;
+
+      /* Call notify callback */
+      if (schedule->notify)
+	schedule->notify(schedule, FALSE, task, FALSE, 0, 0, 0, 0,
+			 schedule->notify_context);
       ret = TRUE;
     }
   }
@@ -863,6 +936,12 @@
       task->revents = mask;
       silc_schedule_dispatch_fd(schedule);
     }
+
+    /* Call notify callback */
+    if (schedule->notify)
+      schedule->notify(schedule, TRUE, (SilcTask)task,
+		       TRUE, task->fd, mask, 0, 0,
+		       schedule->notify_context);
   }
 
   SILC_SCHEDULE_UNLOCK(schedule);

Modified: silc-client/branches/upstream/current/lib/silcutil/silcschedule.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcschedule.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcschedule.h (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcschedule.h Fri Jun 29 13:50:15 2007
@@ -158,6 +158,49 @@
 				 SilcTaskEvent type, SilcUInt32 fd,
 				 void *context);
 
+/****f* silcutil/SilcScheduleAPI/SilcTaskNotifyCb
+ *
+ * SYNOPSIS
+ *
+ *    typedef void (*SilcTaskNotifyCb)(SilcSchedule schedule,
+ *                                     SilcBool added, SilcTask task,
+ *                                     SilcBool fd_task, SilcUInt32 fd,
+ *                                     SilcTaskEvent event,
+ *                                     long seconds, long useconds,
+ *                                     void *context);
+ *
+ * DESCRIPTION
+ *
+ *    Task notify callback.  Callback of this type can be set to scheduler
+ *    by calling silc_schedule_set_notify and will be called whenever new
+ *    task is added or old task is removed.  If `added' is TRUE then `task'
+ *    is added to scheduler.  If `added' is FALSE then `task' will be removed
+ *    from the scheduler.  If `fd_task' is TRUE the `task' is file descriptor
+ *    task and has `fd' is its file descriptor.  If `fd_task' is FALSE then
+ *    the task is timeout task and `seconds' and `useconds' specify the
+ *    timeout.  The `context' is the context given to silc_schedule_set_notify.
+ *
+ * NOTES
+ *
+ *    The `schedule' is locked while this callback is called.  This means that
+ *    new tasks cannot be added or removed inside this callback.
+ *
+ *    When timeout task expires this callback is not called.  This is called
+ *    only when task is explicitly deleted from the scheduler.  Note that,
+ *    when timeout task expires it is removed from the scheduler and `task'
+ *    will become invalid.
+ *
+ *    If fd task changes its events, this will be called as if it was a new
+ *    task with different `event' mask.
+ *
+ ***/
+typedef void (*SilcTaskNotifyCb)(SilcSchedule schedule,
+				 SilcBool added, SilcTask task,
+				 SilcBool fd_task, SilcUInt32 fd,
+				 SilcTaskEvent event,
+				 long seconds, long useconds,
+				 void *app_context);
+
 /* Macros */
 
 /****d* silcutil/SilcScheduleAPI/SILC_ALL_TASKS
@@ -184,8 +227,8 @@
  *
  * DESCRIPTION
  *
- *    Generic macro to define task callback functions. This defines a
- *    static function with name `func' as a task callback function.
+ *    Generic macro to declare task callback functions. This defines a
+ *    function with name `func' as a task callback function.
  *
  * SOURCE
  */
@@ -335,6 +378,22 @@
  ***/
 void *silc_schedule_get_context(SilcSchedule schedule);
 
+/****f* silcutil/SilcScheduleAPI/silc_schedule_set_notify
+ *
+ * SYNOPSIS
+ *
+ *    void silc_schedule_set_notify(SilcSchedule schedule,
+ *                                  SilcTaskNotifyCb notify, void *context);
+ *
+ * DESCRIPTION
+ *
+ *    Set notify callback to scheduler.  The `notify' will be called whenever
+ *    task is added to or deleted from scheduler.
+ *
+ ***/
+void silc_schedule_set_notify(SilcSchedule schedule,
+			      SilcTaskNotifyCb notify, void *context);
+
 /****f* silcutil/SilcScheduleAPI/silc_schedule_task_add_fd
  *
  * SYNOPSIS
@@ -374,7 +433,7 @@
  *    Add timeout task to scheduler.  The `callback' will be called once
  *    the specified timeout has elapsed.  The task will be removed from the
  *    scheduler automatically once the task expires.  The event returned
- *    to the `callback' is SILC_TASK_EXPIRE.  The task added with zero (0)
+ *    to the `callback' is SILC_TASK_EXPIRE.  A task added with zero (0)
  *    timeout will be executed immediately next time tasks are scheduled.
  *
  ***/

Modified: silc-client/branches/upstream/current/lib/silcutil/silcschedule_i.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcschedule_i.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcschedule_i.h (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcschedule_i.h Fri Jun 29 13:50:15 2007
@@ -74,6 +74,8 @@
 struct SilcScheduleStruct {
   void *internal;
   void *app_context;		   /* Application specific context */
+  SilcTaskNotifyCb notify;	   /* Notify callback */
+  void *notify_context;		   /* Notify context */
   SilcHashTable fd_queue;	   /* FD task queue */
   SilcList fd_dispatch;		   /* Dispatched FDs */
   SilcList timeout_queue;	   /* Timeout queue */
@@ -106,7 +108,8 @@
      the wakeup mechanism of the scheduler.  In multi-threaded environment
      the scheduler needs to be wakenup when tasks are added or removed from
      the task queues.  Returns context to the platform specific scheduler.
-     If this returns NULL the scheduler initialization will fail. */
+     If this returns NULL the scheduler initialization will fail.  Do not
+     add FD tasks inside function.  Timeout tasks can be added. */
   void *(*init)(SilcSchedule schedule, void *app_context);
 
   /* Uninitializes the platform specific scheduler context. */

Modified: silc-client/branches/upstream/current/lib/silcutil/silcstack.h
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/silcstack.h?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/silcstack.h (original)
+++ silc-client/branches/upstream/current/lib/silcutil/silcstack.h Fri Jun 29 13:50:15 2007
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone at silcnet.org>
 
-  Copyright (C) 2003 - 2006 Pekka Riikonen
+  Copyright (C) 2003 - 2007 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -48,6 +48,7 @@
  *
  * The data stack is not thread-safe.  If the same stack context must be
  * used in multithreaded environment concurrency control must be employed.
+ * Each thread should allocate their own SilcStack.
  *
  ***/
 
@@ -81,11 +82,11 @@
  *    Static stack frame context that optionally can be used as stack
  *    frame in SilcStack.  By default silc_stack_push use pre-allocated
  *    stack frame (or allocates new one if all frames are reserved), but
- *    user may also use staticly allocated SilcStackFrame instead.  This
+ *    user may also use statically allocated SilcStackFrame instead.  This
  *    is recommended when using SilcStack in recursive routine and the
  *    recursion may become deep.  Using static frame assures that during
  *    recursion frames never run out and silc_stack_push never allocates
- *    any memory.  In other normal usage staticly allocated SilcStackFrame
+ *    any memory.  In other normal usage statically allocated SilcStackFrame
  *    is not needed, unless performance is critical.
  *
  ***/
@@ -142,10 +143,10 @@
  *    If this returns zero (0) the system is out of memory.
  *
  *    If the `frame' is non-NULL then that SilcStackFrame is used as
- *    stack frame.  Usually `frame' is set to NULL by user.  Staticly
+ *    stack frame.  Usually `frame' is set to NULL by user.  Statically
  *    allocated SilcStackFrame should be used when using silc_stack_push
  *    in recursive function and the recursion may become deep.  In this
- *    case using staticly allocated SilcStackFrame is recommended since
+ *    case using statically allocated SilcStackFrame is recommended since
  *    it assures that frames never run out and silc_stack_push never
  *    allocates any memory.  If your routine is not recursive then
  *    setting `frame' to NULL is recommended, unless performance is
@@ -169,8 +170,8 @@
  *    silc_foo_parse_packet(packet, stack);
  *    silc_stack_pop(stack);
  *
- *    Another example with recursion and using staticly allocated
- *    SilcStackFrame.  After popping the staticly allocated frame can
+ *    Another example with recursion and using statically allocated
+ *    SilcStackFrame.  After popping the statically allocated frame can
  *    be reused if necessary.
  *
  *    void silc_foo_this_function(SilcStack stack)

Modified: silc-client/branches/upstream/current/lib/silcutil/unix/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/unix/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/unix/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcutil/unix/Makefile.in Fri Jun 29 13:50:15 2007
@@ -214,6 +214,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcutil/unix/silcunixnet.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/unix/silcunixnet.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/unix/silcunixnet.c (original)
+++ silc-client/branches/upstream/current/lib/silcutil/unix/silcunixnet.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: silcunixnet.c,v 1.37 2007/05/10 15:28:38 priikone Exp $ */
+/* $Id: silcunixnet.c,v 1.37.2.2 2007/06/24 14:13:11 priikone Exp $ */
 
 #include "silc.h"
 #include "silcnet.h"
@@ -164,8 +164,8 @@
 
   /* Bind to local addresses */
   for (i = 0; i < local_ip_count; i++) {
-    SILC_LOG_DEBUG(("Binding to local address %s",
-		    local_ip_addr ? local_ip_addr[i] : ipany));
+    SILC_LOG_DEBUG(("Binding to local address %s:%d",
+		    local_ip_addr ? local_ip_addr[i] : ipany, port));
 
     /* Set sockaddr for server */
     if (!silc_net_set_sockaddr(&server,
@@ -628,20 +628,20 @@
     }
 
 #if defined(ECONNREFUSED)
-    if (errno == ECONNREFUSED)
+    if (opt == ECONNREFUSED)
       conn->status = SILC_NET_CONNECTION_REFUSED;
 #endif /* ECONNREFUSED */
 #if defined(ETIMEDOUT)
-    if (errno == ETIMEDOUT)
+    if (opt == ETIMEDOUT)
       conn->status = SILC_NET_CONNECTION_TIMEOUT;
 #endif /* ETIMEDOUT */
 #if defined(ENETUNREACH)
-    if (errno == ENETUNREACH)
+    if (opt == ENETUNREACH)
       conn->status = SILC_NET_HOST_UNREACHABLE;
 #endif /* ENETUNREACH */
 
     /** Connecting failed */
-    SILC_LOG_DEBUG(("Connecting failed"));
+    SILC_LOG_DEBUG(("Connecting failed, error %s", strerror(opt)));
     silc_fsm_next(fsm, silc_net_connect_st_finish);
     return SILC_FSM_CONTINUE;
   }

Modified: silc-client/branches/upstream/current/lib/silcutil/unix/silcunixschedule.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/unix/silcunixschedule.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/unix/silcunixschedule.c (original)
+++ silc-client/branches/upstream/current/lib/silcutil/unix/silcunixschedule.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: silcunixschedule.c,v 1.28.2.2 2007/05/30 15:47:07 priikone Exp $ */
+/* $Id: silcunixschedule.c,v 1.28.2.4 2007/06/24 14:12:26 priikone Exp $ */
 
 #include "silc.h"
 
@@ -319,6 +319,23 @@
   (void)read(internal->wakeup_pipe[0], &c, 1);
 }
 
+SILC_TASK_CALLBACK(silc_schedule_wakeup_init)
+{
+  SilcUnixScheduler internal = schedule->internal;
+
+  internal->wakeup_task =
+    silc_schedule_task_add(schedule, internal->wakeup_pipe[0],
+			   silc_schedule_wakeup_cb, internal,
+			   0, 0, SILC_TASK_FD);
+  if (!internal->wakeup_task) {
+    SILC_LOG_WARNING(("Could not add a wakeup task, threads won't work"));
+    close(internal->wakeup_pipe[0]);
+    return;
+  }
+  silc_schedule_internal_schedule_fd(schedule, internal,
+				     (SilcTaskFd)internal->wakeup_task,
+				     SILC_TASK_READ);
+}
 #endif /* SILC_THREADS */
 
 /* Initializes the platform specific scheduler.  This for example initializes
@@ -376,20 +393,8 @@
     return NULL;
   }
 
-  internal->wakeup_task =
-    silc_schedule_task_add(schedule, internal->wakeup_pipe[0],
-			   silc_schedule_wakeup_cb, internal,
-			   0, 0, SILC_TASK_FD);
-  if (!internal->wakeup_task) {
-    SILC_LOG_ERROR(("Could not add a wakeup task, threads won't work"));
-    close(internal->wakeup_pipe[0]);
-    close(internal->wakeup_pipe[1]);
-    silc_free(internal);
-    return NULL;
-  }
-  silc_schedule_internal_schedule_fd(schedule, internal,
-				     (SilcTaskFd)internal->wakeup_task,
-				     SILC_TASK_READ);
+  silc_schedule_task_add_timeout(schedule, silc_schedule_wakeup_init,
+				 internal, 0, 0);
 #endif /* SILC_THREADS */
 
   internal->app_context = app_context;
@@ -453,6 +458,8 @@
 static void silc_schedule_internal_sighandler(int signal)
 {
   int i;
+
+  SILC_LOG_DEBUG(("Start"));
 
   for (i = 0; i < SIGNAL_COUNT; i++) {
     if (signal_call[i].sig == signal) {
@@ -543,11 +550,13 @@
         signal_call[i].callback) {
       SILC_LOG_DEBUG(("Calling signal %d callback",
 		      signal_call[i].sig));
+      silc_schedule_internal_signals_unblock(schedule, context);
       signal_call[i].callback(schedule, internal->app_context,
 			      SILC_TASK_INTERRUPT,
 			      signal_call[i].sig,
 			      signal_call[i].context);
       signal_call[i].call = FALSE;
+      silc_schedule_internal_signals_block(schedule, context);
     }
   }
 

Modified: silc-client/branches/upstream/current/lib/silcutil/unix/silcunixthread.c
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/unix/silcunixthread.c?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/unix/silcunixthread.c (original)
+++ silc-client/branches/upstream/current/lib/silcutil/unix/silcunixthread.c Fri Jun 29 13:50:15 2007
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
 */
-/* $Id: silcunixthread.c,v 1.15 2007/03/14 15:31:19 priikone Exp $ */
+/* $Id: silcunixthread.c,v 1.15.2.1 2007/06/18 21:04:41 priikone Exp $ */
 
 #include "silc.h"
 
@@ -144,8 +144,7 @@
 {
 #ifdef SILC_THREADS
   if (mutex) {
-    if (pthread_mutex_lock(&mutex->mutex))
-      SILC_ASSERT(FALSE);
+    SILC_VERIFY(pthread_mutex_lock(&mutex->mutex) == 0);
     mutex->locked = TRUE;
   }
 #endif /* SILC_THREADS */
@@ -155,8 +154,7 @@
 {
 #ifdef SILC_THREADS
   if (mutex) {
-    if (pthread_mutex_unlock(&mutex->mutex))
-      SILC_ASSERT(FALSE);
+    SILC_VERIFY(pthread_mutex_unlock(&mutex->mutex) == 0);
     mutex->locked = FALSE;
   }
 #endif /* SILC_THREADS */
@@ -166,7 +164,7 @@
 {
 #ifdef SILC_THREADS
   if (mutex)
-    SILC_ASSERT(mutex->locked);
+    SILC_VERIFY(mutex->locked);
 #endif /* SILC_THREADS */
 }
 
@@ -216,7 +214,7 @@
 {
 #ifdef SILC_THREADS
   if (rwlock)
-    pthread_rwlock_wrlock(&rwlock->rwlock);
+    SILC_VERIFY(pthread_rwlock_wrlock(&rwlock->rwlock) == 0);
 #endif /* SILC_THREADS */
 }
 
@@ -224,7 +222,7 @@
 {
 #ifdef SILC_THREADS
   if (rwlock)
-    pthread_rwlock_unlock(&rwlock->rwlock);
+    SILC_VERIFY(pthread_rwlock_unlock(&rwlock->rwlock) == 0);
 #endif /* SILC_THREADS */
 }
 

Modified: silc-client/branches/upstream/current/lib/silcutil/win32/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcutil/win32/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcutil/win32/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcutil/win32/Makefile.in Fri Jun 29 13:50:15 2007
@@ -214,6 +214,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@

Modified: silc-client/branches/upstream/current/lib/silcvcard/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcvcard/Makefile.am?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcvcard/Makefile.am (original)
+++ silc-client/branches/upstream/current/lib/silcvcard/Makefile.am Fri Jun 29 13:50:15 2007
@@ -2,7 +2,7 @@
 # To make changes edit the ./lib/silcvcard/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcvcard/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 

Modified: silc-client/branches/upstream/current/lib/silcvcard/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-silc/silc-client/branches/upstream/current/lib/silcvcard/Makefile.in?rev=111&op=diff
==============================================================================
--- silc-client/branches/upstream/current/lib/silcvcard/Makefile.in (original)
+++ silc-client/branches/upstream/current/lib/silcvcard/Makefile.in Fri Jun 29 13:50:15 2007
@@ -18,7 +18,7 @@
 # To make changes edit the ./lib/silcvcard/Makefile.ad file in the source tree.
 
 # Source: ./lib/silcvcard/Makefile.ad
-# Generated: Mon Jun  4 08:18:53 EEST 2007 by priikone
+# Generated: Thu Jun 28 19:52:47 EEST 2007 by priikone
 # Distribution: Client
 # License: 
 
@@ -220,6 +220,7 @@
 __SILC_ENABLE_DEBUG = @__SILC_ENABLE_DEBUG@
 __SILC_HAVE_PTHREAD = @__SILC_HAVE_PTHREAD@
 __SILC_HAVE_SIM = @__SILC_HAVE_SIM@
+__SILC_PACKAGE_VERSION = @__SILC_PACKAGE_VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@




More information about the Pkg-silc-commits mailing list