]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Formatting cleanup plus change from tvhlog to tvhtrace as per @perexg comments 364/head
authorIan <ian@sproink.co.uk>
Tue, 20 May 2014 20:28:14 +0000 (21:28 +0100)
committerIan <ian@sproink.co.uk>
Tue, 20 May 2014 20:28:14 +0000 (21:28 +0100)
src/dvr/dvr_db.c
src/muxer.h
src/muxer/muxer_pass.c
src/muxer/tvh/mkmux.c
src/utils.c
src/webui/extjs.c

index 19e85a20eeb19555bbf68b4e9989b57ac6a78750..975ae61f2d95cdd06158a7d6f7926b3439995eaf 100644 (file)
@@ -1090,7 +1090,7 @@ dvr_init(void)
   struct stat st;
   uint32_t u32;
   dvr_config_t *cfg;
-  
+
   dvr_iov_max = sysconf(_SC_IOV_MAX);
 
   /* Default settings */
@@ -1134,8 +1134,10 @@ dvr_init(void)
       htsmsg_get_u32(m, "retention-days", &cfg->dvr_retention_days);
       tvh_str_set(&cfg->dvr_storage, htsmsg_get_str(m, "storage"));
 
-// Convert 0xxx format permission strings to integer for internal use
-// Note no checking that strtol won't overflow int - this should never happen with three-digit numbers      
+/* 
+ * Convert 0xxx format permission strings to integer for internal use
+ * Note no checking that strtol won't overflow int - this should never happen with three-digit numbers 
+ */     
 
       if ((s = htsmsg_get_str(m, "file-permissions")))
         cfg->dvr_muxcnf.m_file_permissions = (int)strtol(s,NULL,0);
@@ -1371,7 +1373,7 @@ dvr_save(dvr_config_t *cfg)
     htsmsg_add_str(m, "config_name", cfg->dvr_config_name);
   htsmsg_add_str(m, "storage", cfg->dvr_storage);
 
-// Convert permissions to 0xxx octal format and output
+/* Convert permissions to 0xxx octal format and output */
 
   snprintf(buffer,sizeof(buffer),"%04o",cfg->dvr_muxcnf.m_file_permissions);
   htsmsg_add_str(m, "file-permissions", buffer);
index 1f85822f96c69c99f46a21034d8bc149cfbc0e09..1c0a85aec35b14ea6a6c4b6b3e1438995791fad4 100644 (file)
@@ -47,8 +47,12 @@ typedef enum {
 typedef struct muxer_config {
   int                  m_flags;
   muxer_cache_type_t m_cache;
-// directory_permissions should really be in dvr.h as it's not really needed for the muxer
-// but it's kept with file_permissions for neatness
+
+/* 
+ * directory_permissions should really be in dvr.h as it's not really needed for the muxer
+ * but it's kept with file_permissions for neatness
+ */
+
   int                  m_file_permissions;
   int                  m_directory_permissions; 
 } muxer_config_t;
index b9bc3b5ec78b504df17c18a4da1c2d5c03730108..906099a6f5d67c3f92d57aa2cf75af6c1486aad2 100644 (file)
@@ -378,7 +378,7 @@ pass_muxer_open_file(muxer_t *m, const char *filename)
   int fd;
   pass_muxer_t *pm = (pass_muxer_t*)m;
 
-  tvhlog(LOG_DEBUG, "pass", "Creating file \"%s\" with file permissions \"%o\"", filename, pm->m_config.m_file_permissions);
+  tvhtrace("pass", "Creating file \"%s\" with file permissions \"%o\"", filename, pm->m_config.m_file_permissions);
  
   fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, pm->m_config.m_file_permissions);
 
index 35b0350765b29d24b5456fd1dc02bc4d9afb38ca..5f366717c347abcf0876c4b899e1433feec5d9a7 100644 (file)
@@ -1050,7 +1050,7 @@ mk_mux_open_file(mk_mux_t *mkm, const char *filename, int permissions)
 {
   int fd;
 
-  tvhlog(LOG_DEBUG, "mkv", "Creating file \"%s\" with file permissions \"%o\"", filename, permissions);
+  tvhtrace("mkv", "Creating file \"%s\" with file permissions \"%o\"", filename, permissions);
   
   fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, permissions);
   
index 6eab4ec7209d7d2994ceaa5bfd035b80cab5b738..8ec429daab3068dd8d453ddbcb388cc8c576c912 100644 (file)
@@ -397,7 +397,7 @@ makedirs ( const char *inpath, int mode )
       path[x] = 0;
       if (stat(path, &st)) {
         err = mkdir(path, mode);
-        tvhlog(LOG_DEBUG, "settings", "Creating directory \"%s\" with octal permissions \"%o\"", path, mode);
+        tvhtrace("settings", "Creating directory \"%s\" with octal permissions \"%o\"", path, mode);
       } else {
         err   = S_ISDIR(st.st_mode) ? 0 : 1;
         errno = ENOTDIR;
index 9ddb549b097256d743cf0f05ed34957f34e4d415..fa50e6bec0775aac283e8e8131df0c9a49ad4407 100755 (executable)
@@ -1128,7 +1128,7 @@ extjs_dvr(http_connection_t *hc, const char *remain, void *opaque)
     htsmsg_add_str(r, "storage", cfg->dvr_storage);
     htsmsg_add_str(r, "container", muxer_container_type2txt(cfg->dvr_mc));
 
-// Convert integer permissions to an octal-format 0xxx string and store it in the config file
+/* Convert integer permissions to an octal-format 0xxx string and store it in the config file */
 
     snprintf(buffer,sizeof(buffer),"%04o",cfg->dvr_muxcnf.m_file_permissions);
     htsmsg_add_str(r, "filePermissions", buffer);
@@ -1176,8 +1176,10 @@ extjs_dvr(http_connection_t *hc, const char *remain, void *opaque)
    if((s = http_arg_get(&hc->hc_req_args, "container")) != NULL)
       dvr_container_set(cfg,s);
 
-// Convert 0xxx format permission strings to integer for internal use
-// Note no checking that strtol won't overflow int - this should never happen with three-digit numbers      
+/*
+ * Convert 0xxx format permission strings to integer for internal use
+ * Note no checking that strtol won't overflow int - this should never happen with three-digit numbers
+ */
 
    if((s = http_arg_get(&hc->hc_req_args, "filePermissions")) != NULL)
       dvr_file_permissions_set(cfg,(int)strtol(s,NULL,0));