"Fossies" - the Fresh Open Source Software Archive

Member "minidlna-1.3.0/upnpglobalvars.c" (24 Nov 2020, 3625 Bytes) of package /linux/privat/minidlna-1.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "upnpglobalvars.c" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.2.1_vs_1.3.0.

    1 /* MiniDLNA project
    2  *
    3  * http://sourceforge.net/projects/minidlna/
    4  *
    5  * MiniDLNA media server
    6  * Copyright (C) 2008-2009  Justin Maggard
    7  *
    8  * This file is part of MiniDLNA.
    9  *
   10  * MiniDLNA is free software; you can redistribute it and/or modify
   11  * it under the terms of the GNU General Public License version 2 as
   12  * published by the Free Software Foundation.
   13  *
   14  * MiniDLNA is distributed in the hope that it will be useful,
   15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17  * GNU General Public License for more details.
   18  *
   19  * You should have received a copy of the GNU General Public License
   20  * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.
   21  *
   22  * Portions of the code from the MiniUPnP project:
   23  *
   24  * Copyright (c) 2006-2007, Thomas Bernard
   25  * All rights reserved.
   26  *
   27  * Redistribution and use in source and binary forms, with or without
   28  * modification, are permitted provided that the following conditions are met:
   29  *     * Redistributions of source code must retain the above copyright
   30  *       notice, this list of conditions and the following disclaimer.
   31  *     * Redistributions in binary form must reproduce the above copyright
   32  *       notice, this list of conditions and the following disclaimer in the
   33  *       documentation and/or other materials provided with the distribution.
   34  *     * The name of the author may not be used to endorse or promote products
   35  *       derived from this software without specific prior written permission.
   36  *
   37  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   38  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   39  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   40  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
   41  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   42  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   43  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   44  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   45  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   46  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   47  * POSSIBILITY OF SUCH DAMAGE.
   48  */
   49 #include <sys/types.h>
   50 #include <netinet/in.h>
   51 #include <sys/param.h>
   52 #include <limits.h>
   53 
   54 #include "config.h"
   55 #include "upnpglobalvars.h"
   56 
   57 /* startup time */
   58 time_t startup_time = 0;
   59 
   60 struct runtime_vars_s runtime_vars;
   61 uint32_t runtime_flags = INOTIFY_MASK | TIVO_BONJOUR_MASK | SUBTITLES_MASK;
   62 
   63 const char *pidfilename = "/var/run/minidlna/minidlna.pid";
   64 
   65 char uuidvalue[] = "uuid:00000000-0000-0000-0000-000000000000";
   66 char modelname[MODELNAME_MAX_LEN] = ROOTDEV_MODELNAME;
   67 char modelnumber[MODELNUMBER_MAX_LEN] = MINIDLNA_VERSION;
   68 char serialnumber[SERIALNUMBER_MAX_LEN] = "00000000";
   69 
   70 /* presentation url :
   71  * http://nnn.nnn.nnn.nnn:ppppp/  => max 30 bytes including terminating 0 */
   72 char presentationurl[PRESENTATIONURL_MAX_LEN];
   73 
   74 int n_lan_addr = 0;
   75 struct lan_addr_s lan_addr[MAX_LAN_ADDR];
   76 int sssdp = -1;
   77 
   78 /* Path of the Unix socket used to communicate with MiniSSDPd */
   79 const char * minissdpdsocketpath = "/var/run/minissdpd.sock";
   80 
   81 /* UPnP-A/V [DLNA] */
   82 sqlite3 *db;
   83 char friendly_name[FRIENDLYNAME_MAX_LEN];
   84 char db_path[1024] = {'\0'};
   85 char log_path[1024] = {'\0'};
   86 struct media_dir_s * media_dirs = NULL;
   87 struct album_art_name_s * album_art_names = NULL;
   88 volatile short int quitting = 0;
   89 volatile uint32_t updateID = 0;
   90 const char *force_sort_criteria = NULL;