Updated the copyright declaration in several modules, removing any language which...
[citadel.git] / citadel / user_ops.c
index 7f72befa7f12abe00aca67c8d403d5772c4c2fcc..f7cb7493870456c61d6eed7434531ce9849e5b35 100644 (file)
@@ -4,18 +4,12 @@
  * Copyright (c) 1987-2011 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
+ * modify it under the terms of the GNU General Public License, version 3.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
 #include "sysdep.h"
@@ -799,13 +793,6 @@ void CtdlUserLogout(void)
                abort_upl(CCC);
        }
 
-       /*
-        * If we were talking to a network node, we're not anymore...
-        */
-       if (!IsEmptyStr(CCC->net_node)) {
-               network_talking_to(CCC->net_node, strlen(CCC->net_node), NTT_REMOVE);
-       }
-
        /* Run any hooks registered by modules... */
        PerformSessionHooks(EVT_LOGOUT);
        
@@ -952,7 +939,6 @@ int CtdlTryPassword(const char *password, long len)
                CONM_syslog(LOG_INFO, "CtdlTryPassword: NULL password string supplied\n");
                return pass_wrong_password;
        }
-       code = (-1);
 
        if (CCC->is_master) {
                code = strcmp(password, config.c_master_pass);
@@ -1011,9 +997,11 @@ int CtdlTryPassword(const char *password, long len)
                strproc(pw);
                strproc(CCC->user.password);
                code = strcasecmp(CCC->user.password, pw);
-               strproc(pw);
-               strproc(CCC->user.password);
-               code = strcasecmp(CCC->user.password, pw);
+               if (code != 0) {
+                       strproc(pw);
+                       strproc(CCC->user.password);
+                       code = strcasecmp(CCC->user.password, pw);
+               }
                free (pw);
        }