mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
style fixes
This commit is contained in:
@@ -78,7 +78,7 @@ main (void)
|
||||
MHD_OPTION_END);
|
||||
if (NULL == daemon)
|
||||
return 1;
|
||||
getchar();
|
||||
MHD_stop_daemon(daemon);
|
||||
(void) getchar();
|
||||
MHD_stop_daemon (daemon);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2595,9 +2595,9 @@ MHD_suspend_connection (struct MHD_Connection *connection);
|
||||
* result in undefined behavior.
|
||||
*
|
||||
* If you are using this function in ``external'' select mode, you must
|
||||
* make sure to run #MHD_run() and #MHD_get_timeout() afterwards (before
|
||||
* make sure to run #MHD_run() and #MHD_get_timeout() afterwards (before
|
||||
* again calling #MHD_get_fdset()), as otherwise the change may not be
|
||||
* reflected in the set returned by #MHD_get_fdset() and you may end up
|
||||
* reflected in the set returned by #MHD_get_fdset() and you may end up
|
||||
* with a connection that is stuck until the next network activity.
|
||||
*
|
||||
* @param connection the connection to resume
|
||||
|
||||
@@ -103,8 +103,10 @@ gnutlscli_connect (int *sock,
|
||||
MHD_socket_close_chk_ (sp[1]);
|
||||
(void) close (0);
|
||||
(void) close (1);
|
||||
dup2 (sp[0], 0);
|
||||
dup2 (sp[0], 1);
|
||||
if (-1 == dup2 (sp[0], 0))
|
||||
abort ();
|
||||
if (-1 == dup2 (sp[0], 1))
|
||||
abort ();
|
||||
MHD_socket_close_chk_ (sp[0]);
|
||||
if (TLS_CLI_GNUTLS == use_tls_tool)
|
||||
{
|
||||
@@ -946,6 +948,7 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
|
||||
fd_set rs;
|
||||
MHD_UNSIGNED_LONG_LONG to;
|
||||
struct timeval tv;
|
||||
int ret;
|
||||
|
||||
di = MHD_get_daemon_info (daemon,
|
||||
MHD_DAEMON_INFO_EPOLL_FD);
|
||||
@@ -962,11 +965,15 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
|
||||
to = 1000;
|
||||
tv.tv_sec = to / 1000;
|
||||
tv.tv_usec = 1000 * (to % 1000);
|
||||
select (ep + 1,
|
||||
&rs,
|
||||
NULL,
|
||||
NULL,
|
||||
&tv);
|
||||
ret = select (ep + 1,
|
||||
&rs,
|
||||
NULL,
|
||||
NULL,
|
||||
&tv);
|
||||
if ( (-1 == ret) &&
|
||||
(EAGAIN != errno) &&
|
||||
(EINTR != errno) )
|
||||
abort ();
|
||||
MHD_run (daemon);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,7 +596,9 @@ main (int argc, char *const *argv)
|
||||
free (sourcefile);
|
||||
return 1;
|
||||
}
|
||||
fwrite (TESTSTR, strlen (TESTSTR), 1, f);
|
||||
if (strlen (TESTSTR) !=
|
||||
fwrite (TESTSTR, strlen (TESTSTR), 1, f))
|
||||
abort ();
|
||||
fclose (f);
|
||||
if (0 != curl_global_init (CURL_GLOBAL_WIN32))
|
||||
return 2;
|
||||
|
||||
Reference in New Issue
Block a user