Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2004-09-17 03:43:09 UTC

Modified files:
     ChangeLog INSTALL include/supported.h ircd/ircd_auth.c
     ircd/ircd_parser.y

Log message:

Make IAuth protocol work again and add a bit of debugging to it.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.469 ircu2.10/ChangeLog:1.470
--- ircu2.10/ChangeLog:1.469    Mon Sep 13 16:08:14 2004
+++ ircu2.10/ChangeLog  Thu Sep 16 20:42:57 2004
@@ -1,3 +1,17 @@
+2004-09-16  Michael Poole <[EMAIL PROTECTED]>
+
+       * INSTALL: Fix name of example.conf and mention its installed
+       location.
+
+       * include/supported.h (FEATURESVALUES2): Fix a reference to
+       channel mode +u that escaped earlier rename attempts.
+
+       * ircd/ircd_auth.c (iauth_connect): Assign port number after
+       zeroing out the destination address.
+       Add some additional debug statements to help follow operations.
+
+       * ircd/ircd_parser.y (iauthblock): Do not require "name" to be set.
+
 2004-09-11  Bas Steendijk <[EMAIL PROTECTED]>
 
        * include/channel.h, include/supported.h, ircd/channel.c,
Index: ircu2.10/INSTALL
diff -u ircu2.10/INSTALL:1.6 ircu2.10/INSTALL:1.7
--- ircu2.10/INSTALL:1.6        Wed Jun 23 18:44:01 2004
+++ ircu2.10/INSTALL    Thu Sep 16 20:42:58 2004
@@ -28,7 +28,8 @@
 Once ircu is compiled, install it by running "make install".
 
 Next, you will have to configure your IRC server by setting up your ircd.conf
-file. Use the included doc/ircd.conf.sample as a starting point. 
+file. Use the included doc/example.conf as a starting point; it is installed
+in $HOME/lib/example.conf by default.
 Setting up ircd.conf can be a bit tricky, so if this is your first time doing
 it, begin with a bare-bones configuration and extend it as you go.
 
Index: ircu2.10/include/supported.h
diff -u ircu2.10/include/supported.h:1.17 ircu2.10/include/supported.h:1.18
--- ircu2.10/include/supported.h:1.17   Sat Sep 11 06:22:49 2004
+++ ircu2.10/include/supported.h        Thu Sep 16 20:42:58 2004
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: supported.h,v 1.17 2004/09/11 13:22:49 entrope Exp $
+ * $Id: supported.h,v 1.18 2004/09/17 03:42:58 entrope Exp $
  *
  * Description: This file has the featureset that ircu announces on connecting
  *              a client.  It's in this .h because it's likely to be appended
@@ -62,7 +62,7 @@
                         NICKLEN, TOPICLEN, AWAYLEN, TOPICLEN, CHANNELLEN
 
 #define FEATURESVALUES2 (feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#"), "(ov)@+", 
"@+", \
-                        (feature_bool(FEAT_OPLEVELS) ? "b,Aku,l,imnpstrD" : 
"b,k,l,imnpstrD"), \
+                        (feature_bool(FEAT_OPLEVELS) ? "b,AkU,l,imnpstrD" : 
"b,k,l,imnpstrD"), \
                         "rfc1459", feature_str(FEAT_NETWORK)
 
 #endif /* INCLUDED_supported_h */
Index: ircu2.10/ircd/ircd_auth.c
diff -u ircu2.10/ircd/ircd_auth.c:1.6 ircu2.10/ircd/ircd_auth.c:1.7
--- ircu2.10/ircd/ircd_auth.c:1.6       Mon Sep 13 15:33:30 2004
+++ ircu2.10/ircd/ircd_auth.c   Thu Sep 16 20:42:59 2004
@@ -17,7 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  * 02111-1307, USA.
  *
- * $Id: ircd_auth.c,v 1.6 2004/09/13 22:33:30 entrope Exp $
+ * $Id: ircd_auth.c,v 1.7 2004/09/17 03:42:59 entrope Exp $
  */
 
 #include "config.h"
@@ -35,6 +35,7 @@
 #include "msgq.h"
 #include "res.h"
 #include "s_bsd.h"
+#include "s_debug.h"
 #include "s_misc.h"
 #include "s_user.h"
 #include "send.h"
@@ -180,8 +181,8 @@
     i_list_head(iauth).iar_next = &i_list_head(iauth);
     msgq_init(&i_sendQ(iauth));
     ircd_strncpy(i_host(iauth), host, HOSTLEN);
-    i_port(iauth) = port;
     memset(&i_addr(iauth), 0, sizeof(i_addr(iauth)));
+    i_port(iauth) = port;
     iauth_active = iauth;
     i_reconnect(iauth) = reconnect;
     iauth_reconnect(iauth);
@@ -191,6 +192,7 @@
   else
     i_passwd(iauth)[0] = '\0';
   i_timeout(iauth) = timeout;
+  i_SetIClass(iauth);
   return iauth;
 }
 
@@ -255,7 +257,7 @@
 void iauth_close_unused(void)
 {
   struct IAuth *prev, *iauth, *next;
-  
+
   for (prev = NULL, iauth = iauth_active; iauth; iauth = next) {
     next = i_next(iauth);
     if (i_GetClosing(iauth)) {
@@ -355,6 +357,7 @@
   IOResult result;
   int fd;
 
+  Debug((DEBUG_INFO, "IAuth attempt connection to %s port %p.", i_host(iauth), 
i_port(iauth)));
   if (!irc_in_addr_valid(&i_addr(iauth).addr)
       && !ircd_aton(&i_addr(iauth).addr, i_host(iauth))) {
     i_query(iauth).vptr = iauth;
@@ -531,8 +534,10 @@
   struct Client *client;
 
   /* If iauth is not connected, we must defer the request. */
-  if (!i_GetConnected(iauth))
+  if (!i_GetConnected(iauth)) {
+    Debug((DEBUG_SEND, "IAuth deferring request for %s because we are not 
connected.", cli_name(iar->iar_client)));
     return;
+  }
 
   /* If no timed request, set up expiration timer. */
   if (!t_active(&i_request_timer(iauth))) {
Index: ircu2.10/ircd/ircd_parser.y
diff -u ircu2.10/ircd/ircd_parser.y:1.24 ircu2.10/ircd/ircd_parser.y:1.25
--- ircu2.10/ircd/ircd_parser.y:1.24    Mon Sep 13 15:33:30 2004
+++ ircu2.10/ircd/ircd_parser.y Thu Sep 16 20:42:59 2004
@@ -17,7 +17,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  *  USA.
- * $Id: ircd_parser.y,v 1.24 2004/09/13 22:33:30 entrope Exp $
+ * $Id: ircd_parser.y,v 1.25 2004/09/17 03:42:59 entrope Exp $
  */
 %{
 
@@ -999,7 +999,7 @@
   tping = 60;
 } iauthitems '}' ';'
 {
-  if (!name || !host || !port) {
+  if (!host || !port) {
     log_write(LS_CONFIG, L_ERROR, 0, "IAuth block needs a server name and port.");
     return 0;
   }
----------------------- End of diff -----------------------

Reply via email to