Re: s.slash0.net unlinked, silc client 1.0.2

Patrik Weiskircher <[email protected]>
Newsgroups gmane.network.silc.user
Message-ID <[email protected]>
> : If nobody fixes it, could we please get 1.0.1 back on silcnet.org?
> : I guess there would be some problems with UTF8 nicks and so forth,
> : but it would atleast start.
> :
> Old versions are available from the silcnet.org site.  Try
> ftp://ftp.silcnet.org/silc
>

Atleast something like the attached patch should be done, so the user
atleast sees the error message.

Patrik

_______________________________________________________________
Info:    https://lists.silcnet.org/mailman/listinfo/silc-users
Archive: https://lists.silcnet.org/pipermail/silc-users
FAQ:     http://silcnet.org/support/faq/
silc_client.patch (application/octet-stream, 3.6 KB)
diff -ur silc-client-1.0.2/irssi/src/silc/core/silc-core.c silc-client-1.0.2_pat/irssi/src/silc/core/silc-core.c
--- silc-client-1.0.2/irssi/src/silc/core/silc-core.c	Tue Mar 15 10:39:21 2005
+++ silc-client-1.0.2_pat/irssi/src/silc/core/silc-core.c	Sun Aug 21 01:30:10 2005
@@ -57,6 +57,12 @@
 void silc_lag_init(void);
 void silc_lag_deinit(void);
 
+void silc_exit(int errorcode) {
+      printf("Press <Enter> to exit...\n");
+      getchar();
+      exit(errorcode);
+}
+
 static int my_silc_scheduler(void)
 {
   silc_client_run_one(silc_client);
@@ -205,7 +211,7 @@
     
     if (!silc_cipher_is_supported(cipher)) {
       SILC_LOG_ERROR(("Unknown cipher `%s'", cipher));
-      exit(1);
+      silc_exit(1);
     }
   }
 
@@ -226,7 +232,7 @@
     
     if (!silc_hash_is_supported(hash)) {
       SILC_LOG_ERROR(("Unknown hash function `%s'", hash));
-      exit(1);
+      silc_exit(1);
     }
   }
 
@@ -247,7 +253,7 @@
     
     if (!silc_hmac_is_supported(hmac)) {
       SILC_LOG_ERROR(("Unknown HMAC `%s'", hmac));
-      exit(1);
+      silc_exit(1);
     }
   }
 
@@ -275,25 +281,25 @@
   if (strcmp(opt->longName, "list-ciphers") == 0) {
     silc_cipher_register_default();
     silc_client_list_ciphers();
-    exit(0);
+    silc_exit(0);
   }
 
   if (strcmp(opt->longName, "list-hash-funcs") == 0) {
     silc_hash_register_default();
     silc_client_list_hash_funcs();
-    exit(0);
+    silc_exit(0);
   }
 
   if (strcmp(opt->longName, "list-hmacs") == 0) {
     silc_hmac_register_default();
     silc_client_list_hmacs();
-    exit(0);
+    silc_exit(0);
   }
 
   if (strcmp(opt->longName, "list-pkcs") == 0) {
     silc_pkcs_register_default();
     silc_client_list_pkcs();
-    exit(0);
+    silc_exit(0);
   }
 
   if (strcmp(opt->longName, "debug") == 0) {
@@ -316,7 +322,7 @@
     silc_hmac_register_default();
     silc_create_key_pair(opt_pkcs, opt_bits, NULL, NULL, NULL,
 			 NULL, NULL, NULL, NULL, TRUE);
-    exit(0);
+    silc_exit(0);
   }
 
   if (strcmp(opt->longName, "passphrase-change") == 0) {
@@ -326,7 +332,7 @@
     silc_hash_register_default();
     silc_hmac_register_default();
     silc_change_private_key_passphrase(arg, NULL, NULL);
-    exit(0);
+    silc_exit(0);
   }
 
   if (strcmp(opt->longName, "show-key") == 0) {
@@ -336,7 +342,7 @@
     silc_hash_register_default();
     silc_hmac_register_default();
     silc_show_public_key((char *)arg);
-    exit(0);
+    silc_exit(0);
   }
 }
 
@@ -344,15 +350,20 @@
 {
   /* Check ~/.silc directory and public and private keys */
   if (!silc_client_check_silc_dir())
-    exit(1);
+    silc_exit(1);
 
   /* Load public and private key */
   if (!silc_client_load_keys(silc_client))
-    exit(1);
+    silc_exit(1);
 
   /* Initialize the SILC client */
   if (!silc_client_init(silc_client))
-    exit(1);
+    silc_exit(1);
+
+  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);
+  silc_log_set_callback(SILC_LOG_FATAL, silc_log_misc, NULL);
 
   /* register SILC scheduler */
   idletag = g_timeout_add(5, (GSourceFunc) my_silc_scheduler, NULL);
@@ -460,11 +471,6 @@
   silc_client->nickname = g_strdup(settings_get_str("nick"));
   silc_client->hostname = silc_net_localhost();
   silc_client->realname = g_strdup(settings_get_str("real_name"));
-
-  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);
-  silc_log_set_callback(SILC_LOG_FATAL, silc_log_misc, NULL);
 
   /* Register SILC to the irssi */
   rec = g_new0(CHAT_PROTOCOL_REC, 1);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.