Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 2 Jul 2012 23:00:53 +0000 (01:00 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 2 Jul 2012 23:00:53 +0000 (01:00 +0200)
17 files changed:
citadel/COPYING
citadel/auth.c
citadel/citserver.c
citadel/clientsocket.c
citadel/context.c
citadel/domain.c
citadel/ecrash.c
citadel/event_client.c
citadel/event_client.h
citadel/housekeeping.c
citadel/ldap.c
citadel/locate_host.c
citadel/room_ops.c
citadel/serv_extensions.c
citadel/sysdep.c
citadel/threads.c
citadel/user_ops.c

index 042bd7127ef602c477301874ea2b410d36f79016..6b5859481fafff60c7d5d003acbe59a53d2e1192 100644 (file)
@@ -34,14 +34,13 @@ Copyright for RFC 2739 openldap schema:
                     GNU GENERAL PUBLIC LICENSE
                        Version 3, 29 June 2007
 
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+Everyone is permitted to copy and distribute verbatim copies of this
+license document.
 
                             Preamble
 
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
+  The GNU General Public License is an open source license for software.
 
   The licenses for most software and other practical works are designed
 to take away your freedom to share and change the works.  By contrast,
index ae09354f230627960660a8d44a9e0b4291c0a029..07f4e9fa701bdc0cc7dc29a60e7f74fd63b38f34 100644 (file)
@@ -6,18 +6,12 @@
  * Copyright (c) 1999-2009 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.
+ * 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
  */
 
 #if defined(__linux) || defined(__sun) /* needed for crypt(): */
index 088b584e1107a751cc5b935f4e08c8c858ea5f58..7e5538b51817757f789466066e61edda741c518e 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.
+ * 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"
index a4b521864087357dff41622fd57e027be94bae25..1f163c222ef1ce5f8cdd33a848a0bccf11221aef 100644 (file)
@@ -7,18 +7,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"
index d08c74d62c69b5534408e442076b35bd56bc4f7e..953d1d6ae77b6e1c8dd1409f3eeae5bd9b985d2d 100644 (file)
@@ -5,18 +5,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.
+ * 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"
index a1049537c3a446e08dab5383db92cbf39bde743f..0e6bb7dabee767a61a70995ab9b3724f8eee9a8d 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.
+ * 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"
index efe071ca5021a7759dabc59355833c76c0204345..b9decd1bfb6fac625e97cec6c7e309186118cebf 100644 (file)
  * vim: ts=4
  *
  * 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.
+ * 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"
index 383668c45722027327f21b26ccebddf44e8cbb55..79a2f0f9c213feb6d4b8517f0de0d7cbef88aae3 100644 (file)
@@ -1,20 +1,13 @@
 /*
- *
  * Copyright (c) 1998-2012 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.
- *
- *  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.
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 3.
  *
- *  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
+ * 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.
  */
 
 #include "sysdep.h"
index 320beb746cb3a6e7d72e53e6a399050261030ef2..9c13039914c6338c49512a456629913828333470 100644 (file)
@@ -3,18 +3,12 @@
  * Copyright (c) 1998-2012 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.
+ *  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
  */
 
 #ifndef __EVENT_CLIENT_H__
index 6eb6440b7e54d7e0cb3bfa582780540f6c627ce6..108410af29a79a7924526d2f214ba5dea868ffea 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.
+ * 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"
index 9d280186487556576427f29861f72846533a586b..385498443839cc8c4d3754652da535bbdad03f59 100644 (file)
@@ -5,18 +5,12 @@
  * Copyright (c) 2011 by Art Cancro and the citadel.org development 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.
+ * 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
  */
 
 int ctdl_require_ldap_version = 3;
index 39309e943c6dd7b8ab5f30d276395bbc08366cd5..d964bc72e0f27972e1dca54708076ccaba031baf 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.
+ * 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"
index aee5c05a17df601952f5edeab7e4eb40ff4c8b0d..4fb1501cdf66f3ec77345144146f61a4dddd7ee6 100644 (file)
@@ -1,21 +1,15 @@
 /* 
  * Server functions which perform operations on room objects.
  *
- * Copyright (c) 1987-2011 by the citadel.org team
+ * Copyright (c) 1987-2012 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.
+ * 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"
@@ -261,6 +255,7 @@ SKIP_EVERYTHING:
        if (view != NULL) *view = vbuf.v_view;
 }
 
+
 /*
  * Self-checking stuff for a room record read into memory
  */
@@ -362,13 +357,10 @@ void b_putroom(struct ctdlroom *qrbuf, char *room_name)
 
        len = bptr - lowercase_name;
        if (qrbuf == NULL) {
-               cdb_delete(CDB_ROOMS,
-                          lowercase_name, len);
+               cdb_delete(CDB_ROOMS, lowercase_name, len);
        } else {
                time(&qrbuf->QRmtime);
-               cdb_store(CDB_ROOMS,
-                         lowercase_name, len,
-                         qrbuf, sizeof(struct ctdlroom));
+               cdb_store(CDB_ROOMS, lowercase_name, len, qrbuf, sizeof(struct ctdlroom));
        }
 }
 
@@ -389,7 +381,6 @@ void b_deleteroom(char *room_name) {
 }
 
 
-
 /*
  * CtdlPutRoomLock()  -  same as CtdlPutRoom() but unlocks the record (if supported)
  */
@@ -401,8 +392,6 @@ void CtdlPutRoomLock(struct ctdlroom *qrbuf)
 
 }
 
-/****************************************************************************/
-
 
 /*
  * CtdlGetFloorByName()  -  retrieve the number of the named floor
@@ -426,7 +415,6 @@ int CtdlGetFloorByName(const char *floor_name)
 }
 
 
-
 /*
  * CtdlGetFloorByNameLock()  -  retrieve floor number for given floor and lock the floor list.
  */
@@ -484,6 +472,7 @@ void CtdlGetFloor(struct floor *flbuf, int floor_num)
 
 }
 
+
 /*
  * lgetfloor()  -  same as CtdlGetFloor() but locks the record (if supported)
  */
@@ -533,7 +522,6 @@ struct floor *CtdlGetCachedFloor(int floor_num) {
 }
 
 
-
 /*
  * CtdlPutFloor()  -  store floor data on disk
  */
@@ -553,7 +541,6 @@ void CtdlPutFloor(struct floor *flbuf, int floor_num)
 }
 
 
-
 /*
  * CtdlPutFloorLock()  -  same as CtdlPutFloor() but unlocks the record (if supported)
  */
@@ -566,7 +553,6 @@ void CtdlPutFloorLock(struct floor *flbuf, int floor_num)
 }
 
 
-
 /*
  * lputfloor()  -  same as CtdlPutFloor() but unlocks the record (if supported)
  */
@@ -591,11 +577,13 @@ void CtdlForEachRoom(void (*CallBack) (struct ctdlroom *EachRoom, void *out_data
                memset(&qrbuf, 0, sizeof(struct ctdlroom));
                memcpy(&qrbuf, cdbqr->ptr,
                       ((cdbqr->len > sizeof(struct ctdlroom)) ?
-                       sizeof(struct ctdlroom) : cdbqr->len));
+                       sizeof(struct ctdlroom) : cdbqr->len)
+               );
                cdb_free(cdbqr);
                room_sanity_check(&qrbuf);
-               if (qrbuf.QRflags & QR_INUSE)
+               if (qrbuf.QRflags & QR_INUSE) {
                        (*CallBack)(&qrbuf, in_data);
+               }
        }
 }
 
@@ -608,7 +596,7 @@ void delete_msglist(struct ctdlroom *whichroom)
         struct cdbdata *cdbml;
 
        /* Make sure the msglist we're deleting actually exists, otherwise
-        * gdbm will complain when we try to delete an invalid record
+        * libdb will complain when we try to delete an invalid record
         */
         cdbml = cdb_fetch(CDB_MSGLISTS, &whichroom->QRnumber, sizeof(long));
         if (cdbml != NULL) {
@@ -620,7 +608,6 @@ void delete_msglist(struct ctdlroom *whichroom)
 }
 
 
-
 /*
  * Message pointer compare function for sort_msglist()
  */
@@ -649,8 +636,7 @@ int sort_msglist(long listptrs[], int oldcount)
 
        /* and yank any nulls */
        while ((numitems > 0) && (listptrs[0] == 0L)) {
-               memmove(&listptrs[0], &listptrs[1],
-                      (sizeof(long) * (numitems - 1)));
+               memmove(&listptrs[0], &listptrs[1], (sizeof(long) * (numitems - 1)));
                --numitems;
        }
 
@@ -674,7 +660,6 @@ int CtdlIsNonEditable(struct ctdlroom *qrbuf)
 }
 
 
-
 /*
  * Back-back-end for all room listing commands
  */
@@ -1054,7 +1039,7 @@ void CtdlUserGoto(char *where, int display_result, int transiently,
        CCC->curr_view = (int)vbuf.v_view;
 
        if (display_result) {
-               cprintf("%d%c%s|%d|%d|%d|%d|%ld|%ld|%d|%d|%d|%d|%d|%d|%d|%d|\n",
+               cprintf("%d%c%s|%d|%d|%d|%d|%ld|%ld|%d|%d|%d|%d|%d|%d|%d|%d|%ld|\n",
                        CIT_OK, CtdlCheckExpress(),
                        truncated_roomname,
                        (int)new_messages,
@@ -1070,7 +1055,8 @@ void CtdlUserGoto(char *where, int display_result, int transiently,
                        (int)vbuf.v_view,
                        (int)CCC->room.QRdefaultview,
                        (int)is_trash,
-                       (int)CCC->room.QRflags2
+                       (int)CCC->room.QRflags2,
+                       (long)CCC->room.QRmtime
                );
        }
 }
index b03741e7a02a90a42c611c412f87c4f03eb18136..861ecb8497adee990ab428fb624c116f78b1c599 100644 (file)
@@ -5,18 +5,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.
+ * 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"
index 25499da30ddaa871cc4d3cbc3a2f3a0646cfc9e1..b59445a850996413b669ab93574c6b6990df29a0 100644 (file)
  * 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.
+ * 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"
index 062d19911870dc59c20660dfe4b6838c82041924..ec8fc3feb6f1ff4cce2f2b3bc16da1d09bc8dfb0 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.
+ * 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 <stdlib.h>
index c29a5613b1561fc84be89bf64dcb8c0c23ce3d49..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"