src/switch_manager/cookie_table.c in trema-0.2.5 vs src/switch_manager/cookie_table.c in trema-0.2.6
- old
+ new
@@ -90,11 +90,11 @@
static cookie_entry_t *
allocate_cookie_entry( uint64_t *original_cookie, char *service_name, uint16_t flags ) {
cookie_entry_t *new_entry;
- new_entry = xmalloc( sizeof ( cookie_entry_t ) );
+ new_entry = xmalloc( sizeof( cookie_entry_t ) );
memset( new_entry, 0, sizeof( cookie_entry_t ) );
new_entry->cookie = generate_cookie();
new_entry->application.cookie = *original_cookie;
@@ -176,13 +176,13 @@
void
delete_cookie_entry( cookie_entry_t *entry ) {
debug( "Deleting cookie entry ( cookie = %#" PRIx64 ", application = [ cookie = %#" PRIx64 ", service_name = %s, "
- "flags = %#x ], reference_count = %d, expire_at = %u ).",
+ "flags = %#x ], reference_count = %d, expire_at = %" PRIu64 " ).",
entry->cookie, entry->application.cookie, entry->application.service_name,
- entry->application.flags, entry->reference_count, entry->expire_at );
+ entry->application.flags, entry->reference_count, ( int64_t ) entry->expire_at );
if ( entry->reference_count > 1 ) {
debug( "Decrementing reference counter ( reference_count = %d ).", entry->reference_count );
entry->reference_count--;
return;
@@ -227,13 +227,13 @@
static void
age_cookie_entry( cookie_entry_t *entry ) {
if ( entry->expire_at < time( NULL ) ) {
// TODO: check if the target flow is still alive or not
warn( "Aging out cookie entry ( cookie = %#" PRIx64 ", application = [ cookie = %#" PRIx64 ", service_name = %s, "
- "flags = %#x ], reference_count = %d, expire_at = %u ).",
+ "flags = %#x ], reference_count = %d, expire_at = %" PRIu64 " ).",
entry->cookie, entry->application.cookie, entry->application.service_name,
- entry->application.flags, entry->reference_count, entry->expire_at );
+ entry->application.flags, entry->reference_count, ( int64_t ) entry->expire_at );
delete_hash_entry( cookie_table.global, &entry->cookie );
delete_hash_entry( cookie_table.application, &entry->application );
free_cookie_entry( entry );
}
@@ -255,12 +255,12 @@
static void
dump_cookie_entry( cookie_entry_t *entry ) {
info( "cookie = %#" PRIx64 ", application = [ cookie = %#" PRIx64 ", service_name = %s, "
- "flags = %#x ], reference_count = %d, expire_at = %u",
+ "flags = %#x ], reference_count = %d, expire_at = %" PRIu64 "",
entry->cookie, entry->application.cookie, entry->application.service_name,
- entry->application.flags, entry->reference_count, entry->expire_at );
+ entry->application.flags, entry->reference_count, ( int64_t ) entry->expire_at );
}
void
dump_cookie_table( void ) {