abort_on_test_timeout();
fprintf(stderr, "ping\n");
- gettimeofday(&before, 0);
+ before = tutil_tvnow();
multi_perform(mhandle, &still_running);
abort_on_test_timeout();
- gettimeofday(&after, 0);
+ after = tutil_tvnow();
e = elapsed(&before, &after);
fprintf(stderr, "pong = %d\n", e);
(void)multi; /* unused */
if (timeout_ms != -1) {
- gettimeofday(timeout, 0);
+ *timeout = tutil_tvnow();
timeout->tv_usec += timeout_ms * 1000;
}
else {
{
struct timeval now;
ssize_t result;
-
- gettimeofday(&now, 0);
+ now = tutil_tvnow();
result = (timeout->tv_sec - now.tv_sec) * 1000000 +
timeout->tv_usec - now.tv_usec;
if (result < 0)
*/
#include "test.h"
-
+#include "strequal.h"
#include "memdebug.h"
static int send_request(CURL *curl, const char *url, int seq,
{
if (!arg)
return CURLAUTH_NONE;
- if (strcasecmp(arg, "basic") == 0)
+ if (strequal(arg, "basic") == 0)
return CURLAUTH_BASIC;
- if (strcasecmp(arg, "digest") == 0)
+ if (strequal(arg, "digest") == 0)
return CURLAUTH_DIGEST;
- if (strcasecmp(arg, "ntlm") == 0)
+ if (strequal(arg, "ntlm") == 0)
return CURLAUTH_NTLM;
return CURLAUTH_NONE;
}
#include "test.h"
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
#include "testutil.h"
#include "testtrace.h"
#include "memdebug.h"