Commit 8045886e authored by Marlene Böhmer's avatar Marlene Böhmer

save state

parent 26d1ad46
Pipeline #3740 passed with stages
in 2 minutes
......@@ -21,6 +21,8 @@
#include "socket.h"
#include "timer.h"
FILE *prrt_debug_log;
static inline prrtPacketLength_t deliver_packet(const PrrtSocket *s, void *buffer, PrrtPacket *packet, struct sockaddr* addr) {
size_t timespec_size = sizeof(struct timespec);
prrtPacketLength_t len = 0;
......@@ -137,6 +139,8 @@ PrrtSocket *PrrtSocket_create(prrtByteCount_t maximum_payload_size, prrtTimedelt
s->prrtReceivePace = PrrtPace_create();
s->appDeliverPace = PrrtPace_create();
prrt_debug_log = stderr;
return s;
error:
......
......@@ -9,9 +9,9 @@ PrrtPace* PrrtPace_create(void) {
PrrtPace* pace = (PrrtPace*) calloc(1, sizeof(PrrtPace));
check_mem(pace);
prrtTimedelta_t filterLength_us = 2 * 1000 * 1000; // 2 seconds
pace->internalPace = PrrtPaceFilter_create(filterLength_us, FILTER_TYPE_MAX);
pace->dependentPace = PrrtPaceFilter_create(filterLength_us, FILTER_TYPE_MAX);
pace->externalPace = PrrtPaceFilter_create(filterLength_us, FILTER_TYPE_MAX);
pace->internalPace = PrrtPaceFilter_create(filterLength_us, FILTER_TYPE_MIN);
pace->dependentPace = PrrtPaceFilter_create(filterLength_us, FILTER_TYPE_MIN);
pace->externalPace = PrrtPaceFilter_create(filterLength_us, FILTER_TYPE_MIN);
pace->totalPauseDuration_ns = 0;
pace->initialized = false;
......
......@@ -22,8 +22,10 @@
#define DEBUG_FEEDBACK 0
#define DEBUG_TIMERECEIVER 1
extern FILE *prrt_debug_log;
#ifdef DEBUG
#define debug(DOMAIN, M, ...) do { if (DEBUG_ALL||(DOMAIN)) fprintf(stderr, "DEBUG %-20s %s:%d: " M "\n", #DOMAIN + 6, __FILE__, __LINE__, ##__VA_ARGS__); } while (0)
#define debug(DOMAIN, M, ...) do { if (DEBUG_ALL||(DOMAIN)) fprintf(prrt_debug_log, "DEBUG %-20s %s:%d: " M "\n", #DOMAIN + 6, __FILE__, __LINE__, ##__VA_ARGS__); } while (0)
#else
#define debug(DOMAIN, M, ...)
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment