Add missing regex include to generated command_list files.
[paraslash.git] / audioc.c
index 0c2049ad71cb06a77297d502d7acae7b3265e79e..81e5d1c53e3d349ac6182c1bb1c03a5283e445c8 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -6,6 +6,7 @@
 
 /** \file audioc.c the client program used to connect to para_audiod */
 
 
 /** \file audioc.c the client program used to connect to para_audiod */
 
+#include <regex.h>
 #include <sys/types.h>
 #include <dirent.h>
 
 #include <sys/types.h>
 #include <dirent.h>
 
@@ -21,7 +22,8 @@ INIT_AUDIOC_ERRLISTS;
 /** the gengetopt structure containing command line args */
 struct audioc_args_info conf;
 
 /** the gengetopt structure containing command line args */
 struct audioc_args_info conf;
 
-INIT_STDERR_LOGGING(conf.loglevel_arg);
+static int loglevel;
+INIT_STDERR_LOGGING(loglevel);
 
 static char *concat_args(unsigned argc, char * const *argv)
 {
 
 static char *concat_args(unsigned argc, char * const *argv)
 {
@@ -87,6 +89,7 @@ int main(int argc, char *argv[])
                        exit(EXIT_FAILURE);
                }
        }
                        exit(EXIT_FAILURE);
                }
        }
+       loglevel = get_loglevel_by_name(conf.loglevel_arg);
        args = conf.inputs_num?
                concat_args(conf.inputs_num, conf.inputs) :
                para_strdup("stat");
        args = conf.inputs_num?
                concat_args(conf.inputs_num, conf.inputs) :
                para_strdup("stat");
@@ -149,6 +152,8 @@ int main(int argc, char *argv[])
                                goto out;
                        }
                        loaded -= ret;
                                goto out;
                        }
                        loaded -= ret;
+                       if (loaded && ret)
+                               memmove(buf, buf + ret, loaded);
                }
        }
 out:
                }
        }
 out: