Commit 669852d3 authored by 's avatar
Browse files

only_once fix (threads)


git-svn-id: file:///home/svn/mapi/trunk@1209 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 27145c28
......@@ -201,10 +201,20 @@ int mapiipc_read(struct mapiipcbuf *qbuf)
return 0;
}
// Sets globals
void mapiipc_set_socket_names(char *socket, char *socketglobal) {
mapidsocket = strdup(socket);
mapidsocketglobal = strdup(socketglobal);
// Sets globals (once)
int mapiipc_set_socket_names(char *socket, char *socketglobal) {
if(mapidsocket == NULL && mapidsocketglobal == NULL) {
mapidsocket = strdup(socket);
mapidsocketglobal = strdup(socketglobal);
return 0;
}
else {
return 1;
}
return -1;
}
int mapiipc_client_init()
......
......@@ -126,7 +126,7 @@ struct mapiipcbuf {
//IPC calls
//Initialize IPC variables
void mapiipc_set_socket_names(char *socket, char *socketglobal);
int mapiipc_set_socket_names(char *socket, char *socketglobal);
//Initialize IPC functions
int mapiipc_client_init(void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment