Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Browse files Browse the repository at this point in the history
	* src/mod_mono.c: Fix problem in Solaris 9 due to alignment. Patch by
	Jonathan Zimmerman. Closes bug #78232.


svn path=/trunk/mod_mono/; revision=64616
  • Loading branch information
gonzalop committed Aug 31, 2006
1 parent 4587970 commit 7cfef74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* src/mod_mono.c: Fix problem in Solaris 9 due to alignment. Patch by
Jonathan Zimmerman. Closes bug #78232.

2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* man/mod_mono.8.in:
Expand Down
8 changes: 4 additions & 4 deletions src/mod_mono.c
Expand Up @@ -1240,7 +1240,7 @@ write_string_to_buffer (char *buffer, int offset, const char *str)
buffer += offset;
tmp = (str != NULL) ? strlen (str) : 0;
le = LE_FROM_INT (tmp);
(*(int32_t *) buffer) = le;
memcpy (buffer, &le, sizeof (int32_t));
if (tmp > 0) {
buffer += sizeof (int32_t);
memcpy (buffer, str, tmp);
Expand Down Expand Up @@ -1311,7 +1311,7 @@ write_table_to_buffer (char *buffer, apr_table_t *table)
} while (t_elt < t_end);

count = LE_FROM_INT (count);
(*(int32_t *) buffer) = count;
memcpy (buffer, &count, sizeof (int32_t));
return (ptr - buffer);
}

Expand Down Expand Up @@ -1365,12 +1365,12 @@ send_initial_data (request_rec *r, apr_socket_t *sock, char auto_app)
ptr += write_string_to_buffer (ptr, 0, r->connection->local_ip);
i = request_get_server_port (r);
i = LE_FROM_INT (i);
(*(int32_t *) ptr) = i;
memcpy (ptr, &i, sizeof (int32_t));
ptr += sizeof (int32_t);
ptr += write_string_to_buffer (ptr, 0, r->connection->remote_ip);
i = connection_get_remote_port (r->connection);
i = LE_FROM_INT (i);
(*(int32_t *) ptr) = i;
memcpy (ptr, &i, sizeof (int32_t));
ptr += sizeof (int32_t);
ptr += write_string_to_buffer (ptr, 0, connection_get_remote_name (r));
ptr += write_table_to_buffer (ptr, r->headers_in);
Expand Down

0 comments on commit 7cfef74

Please sign in to comment.