mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-27 20:26:31 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3c8071edb | ||
|
|
bc70faae09 | ||
|
|
ae7c4c91e0 | ||
|
|
613baa4e1e |
@@ -1,7 +1,7 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
current_version = 0.71
|
current_version = 0.73
|
||||||
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?)?
|
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?)?
|
||||||
serialize =
|
serialize =
|
||||||
{major}.{minor}
|
{major}.{minor}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
pkgname=ustreamer
|
pkgname=ustreamer
|
||||||
pkgver=0.71
|
pkgver=0.73
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Lightweight and fast MJPG-HTTP streamer"
|
pkgdesc="Lightweight and fast MJPG-HTTP streamer"
|
||||||
url="https://github.com/pi-kvm/ustreamer"
|
url="https://github.com/pi-kvm/ustreamer"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ustreamer
|
PKG_NAME:=ustreamer
|
||||||
PKG_VERSION:=0.71
|
PKG_VERSION:=0.73
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com>
|
PKG_MAINTAINER:=Maxim Devaev <mdevaev@gmail.com>
|
||||||
|
|
||||||
|
|||||||
@@ -22,4 +22,4 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION "0.71"
|
#define VERSION "0.73"
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ static int _device_open_check_cap(struct device_t *dev) {
|
|||||||
static int _device_open_dv_timings(struct device_t *dev) {
|
static int _device_open_dv_timings(struct device_t *dev) {
|
||||||
_device_apply_resolution(dev, dev->width, dev->height);
|
_device_apply_resolution(dev, dev->width, dev->height);
|
||||||
if (dev->dv_timings) {
|
if (dev->dv_timings) {
|
||||||
LOG_DEBUG("Using DV-timings");
|
LOG_DEBUG("Using DV timings");
|
||||||
|
|
||||||
if (_device_apply_dv_timings(dev) < 0) {
|
if (_device_apply_dv_timings(dev) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -199,19 +199,25 @@ int http_server_listen(struct http_server_t *server) {
|
|||||||
|
|
||||||
if (server->unix_path[0] != '\0') {
|
if (server->unix_path[0] != '\0') {
|
||||||
struct sockaddr_un unix_addr;
|
struct sockaddr_un unix_addr;
|
||||||
int unix_fd_flags;
|
|
||||||
|
|
||||||
LOG_DEBUG("Binding HTTP to UNIX socket '%s' ...", server->unix_path);
|
LOG_DEBUG("Binding HTTP to UNIX socket '%s' ...", server->unix_path);
|
||||||
|
|
||||||
assert((server->run->unix_fd = socket(AF_UNIX, SOCK_STREAM, 0)));
|
# define MAX_SUN_PATH (sizeof(unix_addr.sun_path) - 1)
|
||||||
assert((unix_fd_flags = fcntl(server->run->unix_fd, F_GETFL)) >= 0);
|
|
||||||
unix_fd_flags |= O_NONBLOCK;
|
|
||||||
assert(fcntl(server->run->unix_fd, F_SETFL, unix_fd_flags) >= 0);
|
|
||||||
|
|
||||||
strncpy(unix_addr.sun_path, server->unix_path, 107);
|
if (strlen(server->unix_path) > MAX_SUN_PATH) {
|
||||||
unix_addr.sun_path[107] = '\0';
|
LOG_ERROR("UNIX socket path is too long, max=%zu", MAX_SUN_PATH);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
MEMSET_ZERO(unix_addr);
|
||||||
|
strncpy(unix_addr.sun_path, server->unix_path, MAX_SUN_PATH);
|
||||||
unix_addr.sun_family = AF_UNIX;
|
unix_addr.sun_family = AF_UNIX;
|
||||||
|
|
||||||
|
# undef MAX_SUN_PATH
|
||||||
|
|
||||||
|
assert((server->run->unix_fd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0);
|
||||||
|
assert(!evutil_make_socket_nonblocking(server->run->unix_fd));
|
||||||
|
|
||||||
if (server->unix_rm && unlink(server->unix_path) < 0) {
|
if (server->unix_rm && unlink(server->unix_path) < 0) {
|
||||||
if (errno != ENOENT) {
|
if (errno != ENOENT) {
|
||||||
LOG_PERROR("Can't remove old UNIX socket '%s'", server->unix_path);
|
LOG_PERROR("Can't remove old UNIX socket '%s'", server->unix_path);
|
||||||
|
|||||||
Reference in New Issue
Block a user