removed extra blr_file_add_magic
removed extra blr_file_add_magic
This commit is contained in:
@ -34,6 +34,7 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
#include <memlog.h>
|
#include <memlog.h>
|
||||||
|
#include <zlib.h>
|
||||||
|
|
||||||
#define BINLOG_FNAMELEN 16
|
#define BINLOG_FNAMELEN 16
|
||||||
#define BLR_PROTOCOL "MySQLBackend"
|
#define BLR_PROTOCOL "MySQLBackend"
|
||||||
|
|||||||
@ -210,9 +210,8 @@ int fd;
|
|||||||
close(router->binlog_fd);
|
close(router->binlog_fd);
|
||||||
spinlock_acquire(&router->binlog_lock);
|
spinlock_acquire(&router->binlog_lock);
|
||||||
strncpy(router->binlog_name, file,BINLOG_FNAMELEN);
|
strncpy(router->binlog_name, file,BINLOG_FNAMELEN);
|
||||||
blr_file_add_magic(router, fd);
|
|
||||||
spinlock_release(&router->binlog_lock);
|
|
||||||
router->binlog_fd = fd;
|
router->binlog_fd = fd;
|
||||||
|
spinlock_release(&router->binlog_lock);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,12 +253,13 @@ int fd;
|
|||||||
LOGIF(LE, (skygw_log_write(LOGFILE_ERROR,
|
LOGIF(LE, (skygw_log_write(LOGFILE_ERROR,
|
||||||
"%s: binlog file %s has an invalid length %d.",
|
"%s: binlog file %s has an invalid length %d.",
|
||||||
router->service->name, path, router->binlog_position)));
|
router->service->name, path, router->binlog_position)));
|
||||||
close(fd);
|
close(fd);
|
||||||
|
spinlock_release(&router->binlog_lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spinlock_release(&router->binlog_lock);
|
|
||||||
router->binlog_fd = fd;
|
router->binlog_fd = fd;
|
||||||
|
spinlock_release(&router->binlog_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user