changeset 22709:3d092dd95ec1

Fix for changing silc private key passphrase to or from the empty string, preventing silc toolkit library trying to read from stdin (!)
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 23 Apr 2008 16:36:04 +0000
parents 9a810bee2ffd
children a666d3e7447f
files libpurple/protocols/silc/silc.c libpurple/protocols/silc10/silc.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/silc/silc.c	Wed Apr 23 15:00:03 2008 +0000
+++ b/libpurple/protocols/silc/silc.c	Wed Apr 23 16:36:04 2008 +0000
@@ -1192,11 +1192,11 @@
 static void
 silcpurple_change_passwd(PurpleConnection *gc, const char *old, const char *new)
 {
-        char prd[256];
+	char prd[256];
 	g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.pub", silcpurple_silcdir());
 	silc_change_private_key_passphrase(purple_account_get_string(gc->account,
 								     "private-key",
-								     prd), old, new);
+								     prd), old ? old : "", new ? new : "");
 }
 
 static void
--- a/libpurple/protocols/silc10/silc.c	Wed Apr 23 15:00:03 2008 +0000
+++ b/libpurple/protocols/silc10/silc.c	Wed Apr 23 16:36:04 2008 +0000
@@ -962,11 +962,11 @@
 static void
 silcpurple_change_passwd(PurpleConnection *gc, const char *old, const char *new)
 {
-        char prd[256];
+	char prd[256];
 	g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.pub", silcpurple_silcdir());
 	silc_change_private_key_passphrase(purple_account_get_string(gc->account,
 								   "private-key",
-								   prd), old, new);
+								   prd), old ? old : "", new ? new : "");
 }
 
 static void