CHECK_ERRNO(pstream_open(fpv->pvconn_name, &fpv->pstream), 0);
free(bind_path);
} else if (!strcmp(type, "tcp") || !strcmp(type, "ssl")) {
CHECK_ERRNO(pstream_open(fpv->pvconn_name, &fpv->pstream), 0);
free(bind_path);
} else if (!strcmp(type, "tcp") || !strcmp(type, "ssl")) {
/* Connects to a fake_pvconn with vconn_open(), then closes the listener and
* verifies that vconn_connect() reports 'expected_error'. */
static void
/* Connects to a fake_pvconn with vconn_open(), then closes the listener and
* verifies that vconn_connect() reports 'expected_error'. */
static void
- expected_error = !strcmp(type, "unix") ? EPIPE : ECONNRESET;
+ expected_error = (!strcmp(type, "unix") ? EPIPE
+ : !strcmp(type, "tcp") ? ECONNRESET
+ : EPROTO);
fpv_create(type, &fpv);
CHECK_ERRNO(vconn_open(fpv.vconn_name, OFP_VERSION, &vconn), 0);
fpv_create(type, &fpv);
CHECK_ERRNO(vconn_open(fpv.vconn_name, OFP_VERSION, &vconn), 0);
* reads the hello message from it, then closes the connection and verifies
* that vconn_connect() reports 'expected_error'. */
static void
* reads the hello message from it, then closes the connection and verifies
* that vconn_connect() reports 'expected_error'. */
static void
/* Try connecting and sending a hello packet that has its length field as 0,
* which should fail with EPROTO. */
static void
/* Try connecting and sending a hello packet that has its length field as 0,
* which should fail with EPROTO. */
static void
/* Try connecting and sending a hello packet that has a bad version, which
* should fail with EPROTO. */
static void
/* Try connecting and sending a hello packet that has a bad version, which
* should fail with EPROTO. */
static void
main(int argc, char *argv[])
{
set_program_name(argv[0]);
main(int argc, char *argv[])
{
set_program_name(argv[0]);
- time_init();
- vlog_init();
- vlog_set_levels(VLM_ANY_MODULE, VLF_ANY_FACILITY, VLL_EMER);
- vlog_set_levels(VLM_ANY_MODULE, VLF_CONSOLE, VLL_DBG);
+ vlog_set_levels(NULL, VLF_ANY_FACILITY, VLL_EMER);
+ vlog_set_levels(NULL, VLF_CONSOLE, VLL_DBG);