fix(docker): Update Dockerfile paths from src/ to v1/src/
The source code was moved to v1/src/ but the Dockerfile still referenced src/ directly, causing build failures. Updated all COPY paths, uvicorn module paths, test paths, and bandit scan paths. Also added missing v1/__init__.py for Python module resolution. Fixes #33 Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -18,7 +18,7 @@ static const char *TAG = "stream_sender";
|
||||
static int s_sock = -1;
|
||||
static struct sockaddr_in s_dest_addr;
|
||||
|
||||
int stream_sender_init(void)
|
||||
static int sender_init_internal(const char *ip, uint16_t port)
|
||||
{
|
||||
s_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if (s_sock < 0) {
|
||||
@@ -28,19 +28,29 @@ int stream_sender_init(void)
|
||||
|
||||
memset(&s_dest_addr, 0, sizeof(s_dest_addr));
|
||||
s_dest_addr.sin_family = AF_INET;
|
||||
s_dest_addr.sin_port = htons(CONFIG_CSI_TARGET_PORT);
|
||||
s_dest_addr.sin_port = htons(port);
|
||||
|
||||
if (inet_pton(AF_INET, CONFIG_CSI_TARGET_IP, &s_dest_addr.sin_addr) <= 0) {
|
||||
ESP_LOGE(TAG, "Invalid target IP: %s", CONFIG_CSI_TARGET_IP);
|
||||
if (inet_pton(AF_INET, ip, &s_dest_addr.sin_addr) <= 0) {
|
||||
ESP_LOGE(TAG, "Invalid target IP: %s", ip);
|
||||
close(s_sock);
|
||||
s_sock = -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "UDP sender initialized: %s:%d", CONFIG_CSI_TARGET_IP, CONFIG_CSI_TARGET_PORT);
|
||||
ESP_LOGI(TAG, "UDP sender initialized: %s:%d", ip, port);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int stream_sender_init(void)
|
||||
{
|
||||
return sender_init_internal(CONFIG_CSI_TARGET_IP, CONFIG_CSI_TARGET_PORT);
|
||||
}
|
||||
|
||||
int stream_sender_init_with(const char *ip, uint16_t port)
|
||||
{
|
||||
return sender_init_internal(ip, port);
|
||||
}
|
||||
|
||||
int stream_sender_send(const uint8_t *data, size_t len)
|
||||
{
|
||||
if (s_sock < 0) {
|
||||
|
||||
Reference in New Issue
Block a user