Ver código fonte

dmq: check if dmq socket exists

Alex Hermann 11 anos atrás
pai
commit
c6d2480efd
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      modules/dmq/dmq.c

+ 4 - 0
modules/dmq/dmq.c

@@ -228,6 +228,10 @@ static int mod_init(void)
 		LM_ERR("failed to create socket out of server_uri\n");
 		LM_ERR("failed to create socket out of server_uri\n");
 		return -1;
 		return -1;
 	}
 	}
+	if (lookup_local_socket(&dmq_server_socket) == NULL) {
+		LM_ERR("server_uri is not a socket the proxy is listening on\n");
+		return -1;
+	}
 
 
 	/* allocate workers array */
 	/* allocate workers array */
 	workers = shm_malloc(num_workers * sizeof(*workers));
 	workers = shm_malloc(num_workers * sizeof(*workers));