projects
/
prss.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
54c2b8d
)
(no commit message)
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Sun, 28 Apr 2013 08:30:32 +0000
(08:30 +0000)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Sun, 28 Apr 2013 08:30:32 +0000
(08:30 +0000)
src/ttrss_ws.c
patch
|
blob
|
history
diff --git
a/src/ttrss_ws.c
b/src/ttrss_ws.c
index
d2c673f
..
98b7f37
100644
(file)
--- a/
src/ttrss_ws.c
+++ b/
src/ttrss_ws.c
@@
-30,7
+30,7
@@
#include "ttrss_ws.h"
#include "url.h"
#include "ttrss_ws.h"
#include "url.h"
-static pthread_mutex_t
*
lock;
+static pthread_mutex_t lock;
static char *session_id;
static char *session_url;
static char *session_id;
static char *session_url;
@@
-134,7
+134,7
@@
struct json_object *ws_execute(struct json_object *rq)
struct json_object *result;
log_debug("ws_execute()");
struct json_object *result;
log_debug("ws_execute()");
- pthread_mutex_lock(lock);
+ pthread_mutex_lock(
&
lock);
log_debug("ws_execute() lock");
err = NULL;
log_debug("ws_execute() lock");
err = NULL;
@@
-152,7
+152,7
@@
struct json_object *ws_execute(struct json_object *rq)
}
log_debug("ws_execute() unlock");
}
log_debug("ws_execute() unlock");
- pthread_mutex_unlock(lock);
+ pthread_mutex_unlock(
&
lock);
log_debug("ws_execute()");
log_debug("ws_execute()");
@@
-404,8
+404,6
@@
void ws_set_article_unread(int id, int unread)
void ws_init()
{
pthread_mutexattr_t attr;
void ws_init()
{
pthread_mutexattr_t attr;
-
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
- lock = malloc(sizeof(pthread_mutex_t));
- pthread_mutex_init(lock, &attr);
+ pthread_mutex_init(&lock, &attr);
}
}