Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: dev

Issue 347 in cherokee: Trivial compiler fixes bug

 

 

Cherokee dev RSS feed   Index | Next | Previous | View Threaded


codesite-noreply at google

Jan 29, 2009, 8:16 AM

Post #1 of 23 (1128 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug

Status: Started
Owner: ste...@konink.de
Labels: Type-Defect Priority-High Component-Logic Maintainability
Milestone-0.99

New issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

In this bug I'll post all the trivial compiler fixes that I see within the
Cherokee code;

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 8:20 AM

Post #2 of 23 (1088 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #1 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

_sent is only used in the Darwin Sendfile code.

Index: socket.c
===================================================================
--- socket.c (revision 2793)
+++ socket.c (working copy)
@@ -988,7 +988,9 @@
ssize_t *sent)
{
int re;
+#ifdef DARWIN_SENDFILE_API
off_t _sent = size;
+#endif
static cherokee_boolean_t no_sys = false;

/* Exit if there is no sendfile() function in the system


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 8:24 AM

Post #3 of 23 (1090 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #2 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Fixes an unitialised value.

Index: resolv_cache.c
===================================================================
--- resolv_cache.c (revision 2793)
+++ resolv_cache.c (working copy)
@@ -154,7 +154,7 @@
table_add_new_entry (cherokee_resolv_cache_t *resolv, const char *domain,
cherokee_resolv_cache_entry_t **entry)
{
ret_t ret;
- cherokee_resolv_cache_entry_t *n;
+ cherokee_resolv_cache_entry_t *n = NULL;

/* Instance the entry
*/


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 8:28 AM

Post #4 of 23 (1089 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #3 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Also fixes the re = only used in bsd/darwin.

Index: socket.c
===================================================================
--- socket.c (revision 2793)
+++ socket.c (working copy)
@@ -987,8 +987,12 @@
off_t *offset,
ssize_t *sent)
{
+#if defined(DARWIN_SENDFILE_API) || defined(FREEBSD_SENDFILE_API)
int re;
+#ifdef DARWIN_SENDFILE_API
off_t _sent = size;
+#endif
+#endif
static cherokee_boolean_t no_sys = false;

/* Exit if there is no sendfile() function in the system


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 8:32 AM

Post #5 of 23 (1090 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #4 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

These variables are signed in the structure; if made unsigned globally the
update_ghost_* functions complain.

Index: cache.c
===================================================================
--- cache.c (revision 2793)
+++ cache.c (working copy)
@@ -369,10 +369,10 @@
{
/* cache->priv->mutex is LOCKED */

- cuint_t c = cache->max_size;
- cuint_t len_l1 = cache->len_t1 + cache->len_b1;
- cuint_t len_l2 = cache->len_t2 + cache->len_b2;
- cuint_t total_len = len_l1 + len_l2;
+ cint_t c = cache->max_size;
+ cint_t len_l1 = cache->len_t1 + cache->len_b1;
+ cint_t len_l2 = cache->len_t2 + cache->len_b2;
+ cint_t total_len = len_l1 + len_l2;
cherokee_cache_entry_t *tmp = NULL;

cache->count_miss += 1;


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 8:36 AM

Post #6 of 23 (1090 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #5 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Unused variables.

Index: connection.c
===================================================================
--- connection.c (revision 2793)
+++ connection.c (working copy)
@@ -787,7 +787,6 @@
cherokee_connection_tx_add (cherokee_connection_t *conn, ssize_t tx)
{
cuint_t to_sleep;
- cherokee_thread_t *thread = CONN_THREAD(conn);

/* Count it
*/
@@ -1236,6 +1235,8 @@
char *end;
encoder_func_new_t new_func = NULL;

+ UNUSED(encoders);
+
/* ptr = Header at the "Accept-Encoding" position
*/
end = strchr (ptr, CHR_CR);


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 8:40 AM

Post #7 of 23 (1088 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #6 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Uninitialised values.

Index: server.c
===================================================================
--- server.c (revision 2793)
+++ server.c (working copy)
@@ -749,7 +749,7 @@
{
int re;
ret_t ret;
- struct passwd *ent;
+ struct passwd *ent = NULL;
cherokee_list_t *i;
cherokee_boolean_t loggers_done = false;


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 8:44 AM

Post #8 of 23 (1089 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #7 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Goto out is used before can_block has been set; Alo you might need to check
this out;
possible bug.

Index: thread.c
===================================================================
--- thread.c (revision 2793)
+++ thread.c (working copy)
@@ -1675,7 +1675,7 @@
cherokee_boolean_t dont_block)
{
ret_t ret;
- cherokee_boolean_t can_block;
+ cherokee_boolean_t can_block = false;
cherokee_boolean_t time_updated;
cherokee_server_t *srv = THREAD_SRV(thd);
int fdwatch_msecs = srv->fdwatch_msecs;


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 8:48 AM

Post #9 of 23 (1090 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #8 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Index: validator_pam.c
===================================================================
--- validator_pam.c (revision 2793)
+++ validator_pam.c (working copy)
@@ -43,6 +43,10 @@
ret_t
cherokee_validator_pam_configure (cherokee_config_node_t *conf,
cherokee_server_t
*srv, cherokee_module_props_t **props)
{
+ UNUSED(conf);
+ UNUSED(srv);
+ UNUSED(props);
+
return ret_ok;
}

@@ -145,6 +149,8 @@

extern int _pam_dispatch (pam_handle_t *, int, int);

+ UNUSED(pam);
+
/* Start the PAM query
*/
ret = pam_start (CHEROKEE_AUTH_SERVICE, conn->validator->user.buf,
&pamconv,
&pamhandle);
@@ -228,6 +234,10 @@
ret_t
cherokee_validator_pam_add_headers (cherokee_validator_pam_t *pam,
cherokee_connection_t *conn, cherokee_buffer_t *buf)
{
+ UNUSED(pam);
+ UNUSED(conn);
+ UNUSED(buf);
+
return ret_ok;
}


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 8:59 AM

Post #10 of 23 (1090 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #9 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Index: handler_proxy.c
===================================================================
--- handler_proxy.c (revision 2793)
+++ handler_proxy.c (working copy)
@@ -846,6 +846,8 @@
{
char *p = begin;

+ UNUSED(hdl);
+
/* Iterate through the number */
while (((*p >= '0') && (*p <= '9')) ||
((*p >= 'a') && (*p <= 'f')) ||


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 29, 2009, 9:03 AM

Post #11 of 23 (1089 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #10 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Again a goto out will have re uninitialised and might return ret_ok when it
is not
intended.

Index: validator.c
===================================================================
--- validator.c (revision 2793)
+++ validator.c (working copy)
@@ -350,7 +353,7 @@
ret_t
cherokee_validator_digest_check (cherokee_validator_t *validator,
cherokee_buffer_t
*passwd, cherokee_connection_t *conn)
{
- int re;
+ int re = 1;
ret_t ret;
cherokee_buffer_t a1 = CHEROKEE_BUF_INIT;
cherokee_buffer_t buf = CHEROKEE_BUF_INIT;


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Jan 31, 2009, 12:50 PM

Post #12 of 23 (1070 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #11 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Index: source.c
===================================================================
--- source.c (revision 2793)
+++ source.c (working copy)
@@ -133,7 +133,7 @@
ret = cherokee_socket_set_client (sock, AF_INET);
}

- if (ret != ret_ok)
+ if (unlikely(ret != ret_ok))
return ret;

/* Query the host */


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 4, 2009, 6:03 PM

Post #13 of 23 (1062 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #12 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

This fixes the stupid leak we could actually fix.

Index: cryptor.c
===================================================================
--- cryptor.c (revision 2834)
+++ cryptor.c (working copy)
@@ -47,10 +47,17 @@
ret_t
cherokee_cryptor_free (cherokee_cryptor_t *cryp)
{
+ ret_t ret;
+
if (MODULE(cryp)->free == NULL)
return ret_error;

- return MODULE(cryp)->free (cryp);
+ if (MODULE(cryp)->free (cryp) != ret_ok)
+ return ret;
+
+ free(cryp);
+
+ return ret_ok;
}


Index: server.c
===================================================================
--- server.c (revision 2834)
+++ server.c (working copy)
@@ -278,6 +278,9 @@
if (srv->iocache)
cherokee_iocache_free (srv->iocache);

+ if (srv->cryptor)
+ cherokee_cryptor_free (srv->cryptor);
+
cherokee_nonce_table_free (srv->nonces);

/* Virtual servers
@@ -294,6 +297,7 @@

cherokee_avl_mrproper (&srv->sources,
(cherokee_func_free_t)cherokee_source_free);

+
/* Module loader: It must be the last action to be performed
* because it will close all the opened modules.
*/


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 4, 2009, 6:09 PM

Post #14 of 23 (1064 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Updates:
Status: WaitingQA

Comment #13 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Needs merging.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 6, 2009, 1:27 AM

Post #15 of 23 (1062 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #14 on issue 347 by alobbs: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

First is here:
http://svn.cherokee-project.com/changeset/2840

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 6, 2009, 2:11 AM

Post #16 of 23 (1063 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #15 on issue 347 by alobbs: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

http://svn.cherokee-project.com/changeset/2841
http://svn.cherokee-project.com/changeset/2842
http://svn.cherokee-project.com/changeset/2845


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 6, 2009, 2:15 AM

Post #17 of 23 (1066 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #16 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Should I make a new patch for all Win32/#ifdef stuff?

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 6, 2009, 5:21 AM

Post #18 of 23 (1056 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #17 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Just compile fixes.

Index: admin_client.c
===================================================================
--- admin_client.c (revision 2847)
+++ admin_client.c (working copy)
@@ -167,9 +167,8 @@
internal_step (cherokee_admin_client_t *admin)
{
ret_t ret;
- cherokee_downloader_t *downloader = DOWNLOADER(admin->downloader);

- TRACE(ENTRIES, "Downloader phase=%d\n", downloader->phase);
+ TRACE(ENTRIES, "Downloader phase=%d\n",
DOWNLOADER(admin->downloader)->phase);

/* It's stepping
*/
Index: socket.c
===================================================================
--- socket.c (revision 2847)
+++ socket.c (working copy)
@@ -987,8 +987,12 @@
off_t *offset,
ssize_t *sent)
{
+#if defined(DARWIN_SENDFILE_API) || defined(FREEBSD_SENDFILE_API)
int re;
+# ifdef DARWIN_SENDFILE_API
off_t _sent = size;
+# endif
+#endif
static cherokee_boolean_t no_sys = false;

/* Exit if there is no sendfile() function in the system
Index: source.h
===================================================================
--- source.h (revision 2847)
+++ source.h (working copy)
@@ -47,7 +47,7 @@
cherokee_buffer_t original;
cherokee_buffer_t unix_socket;
cherokee_buffer_t host;
- cint_t port;
+ cuint_t port;

cherokee_func_free_t free;
} cherokee_source_t;
Index: cryptor_libssl.c
===================================================================
--- cryptor_libssl.c (revision 2847)
+++ cryptor_libssl.c (working copy)
@@ -148,7 +148,7 @@
}
#endif

-
+#if 0
static int
openssl_verify_peer (int ok, X509_STORE_CTX *x509_store)
{
@@ -157,6 +157,7 @@

return 1;
}
+#endif


static ret_t


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 6, 2009, 5:39 AM

Post #19 of 23 (1056 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #18 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

This basically makes unix sockets only available to systems that have it.
Saves
memory space etc.

Index: source.h
===================================================================
--- source.h (revision 2847)
+++ source.h (working copy)
@@ -45,9 +45,11 @@
typedef struct {
cherokee_source_type_t type;
cherokee_buffer_t original;
+#ifdef HAVE_SOCKADDR_UN
cherokee_buffer_t unix_socket;
+#endif
cherokee_buffer_t host;
- cint_t port;
+ cuint_t port;

cherokee_func_free_t free;
} cherokee_source_t;
Index: source.c
===================================================================
--- source.c (revision 2847)
+++ source.c (working copy)
@@ -43,7 +43,9 @@
cherokee_source_init (cherokee_source_t *src)
{
cherokee_buffer_init (&src->original);
+#ifdef HAVE_SOCKADDR_UN
cherokee_buffer_init (&src->unix_socket);
+#endif
cherokee_buffer_init (&src->host);

src->type = source_host;
@@ -61,7 +63,9 @@
src->free (src);

cherokee_buffer_mrproper (&src->original);
+#ifdef HAVE_SOCKADDR_UN
cherokee_buffer_mrproper (&src->unix_socket);
+#endif
cherokee_buffer_mrproper (&src->host);

return ret_ok;
@@ -85,6 +89,7 @@
if (unlikely (ret!=ret_ok))
return ret;

+#ifdef HAVE_SOCKADDR_UN
/* UNIX socket
*/
if (! cherokee_buffer_is_empty (&src->unix_socket)) {
@@ -106,6 +111,7 @@

goto out;
}
+#endif

/* INET socket
*/
@@ -185,13 +191,15 @@
/* Original
*/
cherokee_buffer_add_buffer (&src->original, host);
-
+
+#ifdef HAVE_SOCKADDR_UN
/* Unix socket
*/
if (host->buf[0] == '/') {
cherokee_buffer_add_buffer (&src->unix_socket, host);
return ret_ok;
- }
+ }
+#endif

/* Host name
*/
@@ -228,10 +236,12 @@
cherokee_source_copy_name (cherokee_source_t *src,
cherokee_buffer_t *buf)
{
+#ifdef HAVE_SOCKADDR_UN
if (! cherokee_buffer_is_empty (&src->unix_socket)) {
cherokee_buffer_add_buffer (buf, &src->unix_socket);
return ret_ok;
}
+#endif

cherokee_buffer_add_buffer (buf, &src->host);
cherokee_buffer_add_char (buf, ':');


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 6, 2009, 5:44 AM

Post #20 of 23 (1058 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #19 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

I don't think we shouldn't do negative port numbers :)

Index: validator_mysql.h
===================================================================
--- validator_mysql.h (revision 2847)
+++ validator_mysql.h (working copy)
@@ -39,7 +39,7 @@
cherokee_module_props_t base;

cherokee_buffer_t host;
- cint_t port;
+ cuint_t port;
cherokee_buffer_t unix_socket;

cherokee_buffer_t user;
Index: validator_ldap.h
===================================================================
--- validator_ldap.h (revision 2847)
+++ validator_ldap.h (working copy)
@@ -41,7 +41,7 @@
cherokee_module_props_t base;

cherokee_buffer_t server;
- cint_t port;
+ cuint_t port;

cherokee_buffer_t binddn;
cherokee_buffer_t bindpw;


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 6, 2009, 5:54 AM

Post #21 of 23 (1059 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #20 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

Might be good to also have these checks here.

Index: validator_mysql.c
===================================================================
--- validator_mysql.c (revision 2847)
+++ validator_mysql.c (working copy)
@@ -43,7 +43,9 @@
props_free (cherokee_validator_mysql_props_t *props)
{
cherokee_buffer_mrproper (&props->host);
+#ifdef HAVE_SOCKADDR_UN
cherokee_buffer_mrproper (&props->unix_socket);
+#endif
cherokee_buffer_mrproper (&props->user);
cherokee_buffer_mrproper (&props->passwd);
cherokee_buffer_mrproper (&props->database);
@@ -67,7 +69,9 @@
cherokee_validator_props_init_base (VALIDATOR_PROPS (n),
MODULE_PROPS_FREE(props_free));

cherokee_buffer_init (&n->host);
- cherokee_buffer_init (&n->unix_socket);
+#ifdef HAVE_SOCKADDR_UN
+ cherokee_buffer_init (&n->unix_socket);
+#endif
cherokee_buffer_init (&n->user);
cherokee_buffer_init (&n->passwd);
cherokee_buffer_init (&n->database);
@@ -89,10 +93,10 @@

} else if (equal_buf_str (&subconf->key, "port")) {
props->port = atoi (subconf->val.buf);
-
+#ifdef HAVE_SOCKADDR_UN
} else if (equal_buf_str (&subconf->key, "unix_socket")) {
cherokee_buffer_add_buffer (&props->unix_socket,
&subconf->val);
-
+#endif
} else if (equal_buf_str (&subconf->key, "user")) {
cherokee_buffer_add_buffer (&props->user,
&subconf->val);

@@ -147,8 +151,11 @@
{
MYSQL *conn;

- if (unlikely ((props->host.buf == NULL) &&
- (props->unix_socket.buf == NULL))) {
+ if (unlikely ((props->host.buf == NULL)
+#ifdef HAVE_SOCKADDR_UN
+ && (props->unix_socket.buf == NULL)
+#endif
+ )) {
PRINT_ERROR_S ("ERROR: MySQL validator misconfigured: A
Host or Unix
socket is needed.");
return ret_error;
}
@@ -163,7 +170,12 @@
props->passwd.buf,
props->database.buf,
props->port,
- props->unix_socket.buf, 0);
+#ifdef HAVE_SOCKADDR_UN
+ props->unix_socket.buf,
+#else
+ NULL,
+#endif
+ 0);
if (conn == NULL) {
PRINT_ERROR ("Unable to connect to MySQL
server: %s:%d %s\n",
props->host.buf, props->port, mysql_error
(mysql->conn));
Index: validator_mysql.h
===================================================================
--- validator_mysql.h (revision 2847)
+++ validator_mysql.h (working copy)
@@ -39,8 +39,10 @@
cherokee_module_props_t base;

cherokee_buffer_t host;
- cint_t port;
+ cuint_t port;
+#ifdef HAVE_SOCKADDR_UN
cherokee_buffer_t unix_socket;
+#endif

cherokee_buffer_t user;
cherokee_buffer_t passwd;


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


codesite-noreply at google

Feb 6, 2009, 5:58 AM

Post #22 of 23 (1057 views)
Permalink
Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Comment #21 on issue 347 by ste...@konink.de: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

So I guess this is the final thing to have unix socket stripped for Win32.

Index: fcgi_manager.c
===================================================================
--- fcgi_manager.c (revision 2847)
+++ fcgi_manager.c (working copy)
@@ -180,7 +180,11 @@
ret = cherokee_source_connect (src, &mgr->socket);
if (ret == ret_ok) break;

- TRACE (ENTRIES, "Couldn't connect: %s, try %d\n",
src->host.buf ? src->host.buf : src->unix_socket.buf, try);
+ TRACE (ENTRIES, "Couldn't connect: %s, try %d\n",
src->host.buf
+#ifdef HAVE_SOCKADDR_UN
+ ? src->host.buf : src->unix_socket.buf,
+#endif
+ , try);

if (try++ >= 3)
return ret;
Index: handler_dbslayer.c
===================================================================
--- handler_dbslayer.c (revision 2847)
+++ handler_dbslayer.c (working copy)
@@ -55,7 +55,11 @@
props->password.buf,
props->db.buf,
hdl->src_ref->port,
+#ifdef HAVE_SOCKADDR_UN
hdl->src_ref->unix_socket.buf,
+#else
+ NULL,
+#endif
CLIENT_MULTI_STATEMENTS |
CLIENT_MULTI_RESULTS);
if (conn == NULL) {
return ret_error;


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

May 18, 2011, 6:33 AM

Post #23 of 23 (325 views)
Permalink
Re: Issue 347 in cherokee: Trivial compiler fixes bug [In reply to]

Updates:
Status: Fixed

Comment #22 on issue 347 by alobbs: Trivial compiler fixes bug
http://code.google.com/p/cherokee/issues/detail?id=347

(No comment was entered for this change.)

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev

Cherokee dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.