chiark / gitweb /
Add a config option to suppres rescan on (un)mount.
[disorder] / lib / url.c
index e05e6bf580fd6d841314167ea84292f6649f7391..7ee1f456295ca4037eb0746a33c51d8dd42d0ff8 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2,20 +2,18 @@
  * This file is part of DisOrder
  * Copyright (C) 2007, 2008 Richard Kettlewell
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free 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 2 of the License, or
+ * 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 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
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 /** @file lib/url.c
  * @brief URL support functions
@@ -49,7 +47,7 @@ char *infer_url(int include_path_info) {
   /* Figure out the server.  'MUST' be set and we don't cope if it
    * is not. */
   if(!(server = getenv("SERVER_NAME")))
-    fatal(0, "SERVER_NAME is not set");
+    disorder_fatal(0, "SERVER_NAME is not set");
   server = xstrdup(server);
   
   /* Figure out the port.  'MUST' be set but we cope if it is not. */
@@ -69,7 +67,7 @@ char *infer_url(int include_path_info) {
   } else {
     /* RFC3875 s4.1.13 */
     if(!(script = getenv("SCRIPT_NAME")))
-      fatal(0, "SCRIPT_NAME is not set");
+      disorder_fatal(0, "SCRIPT_NAME is not set");
     /* SCRIPT_NAME may be "" */
     if(!*script)
       script = "/";
@@ -80,7 +78,7 @@ char *infer_url(int include_path_info) {
                      script, urlencodestring(path_info));
   }
   if(script[0] != '/')
-    fatal(0, "SCRIPT_NAME does not start with a '/'");
+    disorder_fatal(0, "SCRIPT_NAME does not start with a '/'");
   script = xstrdup(script);
   
   if(port == 80)