aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-07 06:19:33 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-07 06:19:33 +0000
commit36ac7973809d0dae4eafb438c63a288c349c38f5 (patch)
tree6347bc183cc50c32d491391702f1a5e4b67daa61
parent8208f31a43bdb5fd079b4124c2a47ef01b5bb5b8 (diff)
downloadlibmicrohttpd-36ac7973809d0dae4eafb438c63a288c349c38f5.tar.gz
libmicrohttpd-36ac7973809d0dae4eafb438c63a288c349c38f5.zip
-use more portable rand instead of random
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog3
-rw-r--r--src/examples/post_example.c12
3 files changed, 10 insertions, 6 deletions
diff --git a/AUTHORS b/AUTHORS
index a7e8b5c2..88b81698 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -23,6 +23,7 @@ Colin Caughie <c.caughie@indigovision.com>
23David Carvalho <andaris@gmail.com> 23David Carvalho <andaris@gmail.com>
24David Reiss <dreiss@facebook.com> 24David Reiss <dreiss@facebook.com>
25Matt Holiday 25Matt Holiday
26Michael Cronenworth <mike@cchtml.com>
26Mika Raento <mikie@iki.fi> 27Mika Raento <mikie@iki.fi>
27Mike Crowe <mac@mcrowe.com> 28Mike Crowe <mac@mcrowe.com>
28John Muth <muth@parascale.com> 29John Muth <muth@parascale.com>
diff --git a/ChangeLog b/ChangeLog
index 008bb249..472f292c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
1Wed Aug 7 08:17:40 CEST 2013
2 Removing dependency on PlibC. -MC
3
1Fri Aug 2 20:55:47 CEST 2013 4Fri Aug 2 20:55:47 CEST 2013
2 Fix HTTP 1.1 compliance with respect to not returning 5 Fix HTTP 1.1 compliance with respect to not returning
3 content-length headers for successful "CONNECT" requests. 6 content-length headers for successful "CONNECT" requests.
diff --git a/src/examples/post_example.c b/src/examples/post_example.c
index 528b8678..173a1353 100644
--- a/src/examples/post_example.c
+++ b/src/examples/post_example.c
@@ -180,10 +180,10 @@ get_session (struct MHD_Connection *connection)
180 snprintf (ret->sid, 180 snprintf (ret->sid,
181 sizeof (ret->sid), 181 sizeof (ret->sid),
182 "%X%X%X%X", 182 "%X%X%X%X",
183 (unsigned int) random (), 183 (unsigned int) rand (),
184 (unsigned int) random (), 184 (unsigned int) rand (),
185 (unsigned int) random (), 185 (unsigned int) rand (),
186 (unsigned int) random ()); 186 (unsigned int) rand ());
187 ret->rc++; 187 ret->rc++;
188 ret->start = time (NULL); 188 ret->start = time (NULL);
189 ret->next = sessions; 189 ret->next = sessions;
@@ -319,7 +319,7 @@ fill_v1_form (const void *cls,
319 319
320 reply = malloc (strlen (form) + strlen (session->value_1) + 1); 320 reply = malloc (strlen (form) + strlen (session->value_1) + 1);
321 if (NULL == reply) 321 if (NULL == reply)
322 return NULL; 322 return MHD_NO;
323 snprintf (reply, 323 snprintf (reply,
324 strlen (form) + strlen (session->value_1) + 1, 324 strlen (form) + strlen (session->value_1) + 1,
325 form, 325 form,
@@ -715,7 +715,7 @@ main (int argc, char *const *argv)
715 return 1; 715 return 1;
716 } 716 }
717 /* initialize PRNG */ 717 /* initialize PRNG */
718 srandom ((unsigned int) time (NULL)); 718 srand ((unsigned int) time (NULL));
719 d = MHD_start_daemon (MHD_USE_DEBUG, 719 d = MHD_start_daemon (MHD_USE_DEBUG,
720 atoi (argv[1]), 720 atoi (argv[1]),
721 NULL, NULL, 721 NULL, NULL,