summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mov_encoder_thread.cc5
-rw-r--r--src/mov_encoder_thread.h6
-rw-r--r--src/server.cc9
-rw-r--r--src/server_status.cc5
4 files changed, 20 insertions, 5 deletions
diff --git a/src/mov_encoder_thread.cc b/src/mov_encoder_thread.cc
index a913e7b..99fd908 100644
--- a/src/mov_encoder_thread.cc
+++ b/src/mov_encoder_thread.cc
@@ -31,6 +31,9 @@
/*
* $Log$
+ * Revision 1.2 2005/05/17 15:12:51 deva
+ * Fixed file rights (All read on files and directories, and all execute on directories).
+ *
* Revision 1.1 2005/05/17 14:30:56 deva
* Added code, preparing threaded encoding.
*
@@ -41,7 +44,7 @@
MovEncoderThread::MovEncoderThread(const char *filename)
{
- file = open(filename, O_CREAT | O_EXCL);
+ file = open(filename, O_CREAT | O_EXCL, S_IRWXU | S_IRGRP | S_IROTH);
threads = 4;
diff --git a/src/mov_encoder_thread.h b/src/mov_encoder_thread.h
index 22fb78c..8b7cd72 100644
--- a/src/mov_encoder_thread.h
+++ b/src/mov_encoder_thread.h
@@ -31,6 +31,9 @@
/*
* $Log$
+ * Revision 1.2 2005/05/17 15:12:51 deva
+ * Fixed file rights (All read on files and directories, and all execute on directories).
+ *
* Revision 1.1 2005/05/17 14:30:56 deva
* Added code, preparing threaded encoding.
*
@@ -45,6 +48,9 @@
#include <fcntl.h>
#include <unistd.h>
+#include <pthread.h>
+#include <semaphore.h>
+
#include <vector>
using namespace std;
diff --git a/src/server.cc b/src/server.cc
index ee14132..03f9552 100644
--- a/src/server.cc
+++ b/src/server.cc
@@ -31,6 +31,9 @@
/*
* $Log$
+ * Revision 1.16 2005/05/17 15:12:51 deva
+ * Fixed file rights (All read on files and directories, and all execute on directories).
+ *
* Revision 1.15 2005/05/17 14:30:56 deva
* Added code, preparing threaded encoding.
*
@@ -114,7 +117,7 @@ void saveFrameAsImage(char* cpr, Frame *f)
// Check for cpr length correctness
if(strlen(cpr) != 11) {
int r = rand();
- fprintf(stderr, "Illigal CPR, it must have length 11, it had lentgh %d\n", strlen(cpr));
+ fprintf(stderr, "Illigal CPR, it must have length 11, it had length %d\n", strlen(cpr));
fprintf(stderr, "Redirecting output to [/tmp/miav-%d.jpg]\n", r);
sprintf(fname, "/tmp/miav-%d.mpg", r);
imgenc.encode(f, fname, 100); // Quality is between 0...100, where 100 is best.
@@ -128,7 +131,7 @@ void saveFrameAsImage(char* cpr, Frame *f)
// Create folder named birthmonth in server root
sprintf(fname, "%s/%s", root->c_str(), birthmonth);
- if(!mkdir(fname, S_IRWXU) == -1 && errno != EEXIST) {
+ if(!mkdir(fname, S_IRWXU | S_IRGRP | S_IXGRP | S_IXOTH | S_IROTH) == -1 && errno != EEXIST) {
int r = rand();
fprintf(stderr, "Not possible to create subfolder %s\n", fname);
fprintf(stderr, "Redirecting output to [/tmp/miav-%d.jpg]\n", r);
@@ -139,7 +142,7 @@ void saveFrameAsImage(char* cpr, Frame *f)
// Create folder named cpr in serverroot/birthmonth
sprintf(fname, "%s/%s/%s", root->c_str(), birthmonth, cpr);
- if(!mkdir(fname, S_IRWXU) == -1 && errno != EEXIST) {
+ if(!mkdir(fname, S_IRWXU | S_IRGRP | S_IXGRP | S_IXOTH | S_IROTH) == -1 && errno != EEXIST) {
int r = rand();
fprintf(stderr, "Not possible to create subfolder %s\n", fname);
fprintf(stderr, "Redirecting output to [/tmp/miav-%d.jpg]\n", r);
diff --git a/src/server_status.cc b/src/server_status.cc
index 197e859..ab155e4 100644
--- a/src/server_status.cc
+++ b/src/server_status.cc
@@ -31,6 +31,9 @@
/*
* $Log$
+ * Revision 1.7 2005/05/17 15:12:51 deva
+ * Fixed file rights (All read on files and directories, and all execute on directories).
+ *
* Revision 1.6 2005/05/16 16:00:57 deva
*
* Lots of stuff!
@@ -56,7 +59,7 @@
#include <stdio.h>
-#define UPD 10
+#define UPD 25
ServerStatus::ServerStatus()
{
gettimeofday(&oldtime, NULL);