projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
bf4c444
)
fixed "unused variable" and some timeq errors when not using threads on compile
author
pk910
<philipp@zoelle1.de>
Sat, 1 Sep 2012 20:33:51 +0000
(22:33 +0200)
committer
pk910
<philipp@zoelle1.de>
Sat, 1 Sep 2012 20:35:33 +0000
(22:35 +0200)
src/ClientSocket.c
patch
|
blob
|
history
src/timeq.c
patch
|
blob
|
history
diff --git
a/src/ClientSocket.c
b/src/ClientSocket.c
index a1a5726a567eef6c33ad81e043010276e1329c16..52316fd3d8f3d7a0a65cb687058b5dc794fe4152 100644
(file)
--- a/
src/ClientSocket.c
+++ b/
src/ClientSocket.c
@@
-217,7
+217,9
@@
int clientsocket_parseorder_top(unsigned int tid) {
static IOHANDLER_CALLBACK(socket_callback) {
struct ClientSocket *client = event->iofd->data;
static IOHANDLER_CALLBACK(socket_callback) {
struct ClientSocket *client = event->iofd->data;
+ #ifdef HAVE_THREADS
unsigned int tid;
unsigned int tid;
+ #endif
switch(event->type) {
case IOEVENT_CONNECTED:
client->flags |= SOCKET_FLAG_CONNECTED;
switch(event->type) {
case IOEVENT_CONNECTED:
client->flags |= SOCKET_FLAG_CONNECTED;
diff --git
a/src/timeq.c
b/src/timeq.c
index 7689b316f0fb35d2614c47d1b9ac212d31baa981..b71bb7569f42480450017870cb693b063f49c3e0 100644
(file)
--- a/
src/timeq.c
+++ b/
src/timeq.c
@@
-49,10
+49,12
@@
struct timeq_entry* timeq_uadd(int useconds, int module_id, timeq_callback_t *ca
perror("malloc() failed");
return NULL;
}
perror("malloc() failed");
return NULL;
}
+ #ifdef HAVE_THREADS
if(!pthread_mutex_initialized) {
THREAD_MUTEX_INIT(synchronized);
pthread_mutex_initialized = 1;
}
if(!pthread_mutex_initialized) {
THREAD_MUTEX_INIT(synchronized);
pthread_mutex_initialized = 1;
}
+ #endif
gettimeofday(&timeout, NULL);
SYNCHRONIZE(synchronized);
timeout.tv_usec += (useconds % 1000);
gettimeofday(&timeout, NULL);
SYNCHRONIZE(synchronized);
timeout.tv_usec += (useconds % 1000);
@@
-83,7
+85,9
@@
struct timeq_entry* timeq_uadd_name(char *name, int useconds, int module_id, tim
}
int timeq_del(struct timeq_entry* entry) {
}
int timeq_del(struct timeq_entry* entry) {
+ #ifdef HAVE_THREADS
if(!pthread_mutex_initialized) return 0;
if(!pthread_mutex_initialized) return 0;
+ #endif
SYNCHRONIZE(synchronized);
if(entry->next)
entry->next->prev = entry->prev;
SYNCHRONIZE(synchronized);
if(entry->next)
entry->next->prev = entry->prev;