[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3737 - in GNUnet/src: include util/getopt util/network
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3737 - in GNUnet/src: include util/getopt util/network |
Date: |
Sun, 12 Nov 2006 19:29:07 -0800 (PST) |
Author: grothoff
Date: 2006-11-12 19:29:02 -0800 (Sun, 12 Nov 2006)
New Revision: 3737
Modified:
GNUnet/src/include/gnunet_util_getopt.h
GNUnet/src/util/getopt/getopt.c
GNUnet/src/util/network/select.c
Log:
fixing types and a deadlock
Modified: GNUnet/src/include/gnunet_util_getopt.h
===================================================================
--- GNUnet/src/include/gnunet_util_getopt.h 2006-11-12 23:57:42 UTC (rev
3736)
+++ GNUnet/src/include/gnunet_util_getopt.h 2006-11-13 03:29:02 UTC (rev
3737)
@@ -60,7 +60,7 @@
/**
* Original command line
*/
- const char ** argv;
+ char * const * argv;
/**
* Total number of argv's.
@@ -205,7 +205,7 @@
struct GC_Configuration * cfg,
const CommandLineOption * allOptions,
unsigned int argc,
- const char ** argv);
+ char * const * argv);
int gnunet_getopt_configure_set_option(CommandLineProcessorContext * ctx,
void * scls,
Modified: GNUnet/src/util/getopt/getopt.c
===================================================================
--- GNUnet/src/util/getopt/getopt.c 2006-11-12 23:57:42 UTC (rev 3736)
+++ GNUnet/src/util/getopt/getopt.c 2006-11-13 03:29:02 UTC (rev 3737)
@@ -969,7 +969,7 @@
static int
GNgetopt_long(int argc,
- const char ** argv,
+ char * const * argv,
const char * options,
const struct GNoption * long_options,
int * opt_index) {
@@ -1000,7 +1000,7 @@
struct GC_Configuration * cfg,
const CommandLineOption * allOptions,
unsigned int argc,
- const char ** argv) {
+ char * const * argv) {
struct GNoption * long_options;
CommandLineProcessorContext clpc;
int count;
Modified: GNUnet/src/util/network/select.c
===================================================================
--- GNUnet/src/util/network/select.c 2006-11-12 23:57:42 UTC (rev 3736)
+++ GNUnet/src/util/network/select.c 2006-11-13 03:29:02 UTC (rev 3737)
@@ -196,6 +196,9 @@
s->locked = -1;
return;
}
+ if (s->locked == 2)
+ return; /* already in process of destroying! */
+ s->locked = 2;
#if DEBUG_SELECT
GE_LOG(sh->ectx,
GE_DEBUG | GE_DEVELOPER | GE_BULK,
@@ -205,10 +208,12 @@
s->rsize,
s->wsize);
#endif
+ MUTEX_UNLOCK(sh->lock);
sh->ch(sh->ch_cls,
sh,
s->sock,
s->sock_ctx);
+ MUTEX_LOCK(sh->lock);
socket_destroy(s->sock);
GROW(s->rbuff,
s->rsize,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3737 - in GNUnet/src: include util/getopt util/network,
grothoff <=