Send Motion-user mailing list submissions to motion-user@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/motion-user or, via email, send a message with subject or body 'help' to motion-user-requ...@lists.sourceforge.net You can reach the person managing the list at motion-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Motion-user digest..." Today's Topics: 1. Re: Motionplus for FreeBSD (Steven Haigh) ---------------------------------------------------------------------- Message: 1 Date: Wed, 05 Jul 2023 10:20:55 +1000 From: Steven Haigh <net...@crc.id.au> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Motionplus for FreeBSD Message-ID: <vmraxr.xkqteowkxi...@crc.id.au> Content-Type: text/plain; charset="utf-8"; Format="flowed" Nice Roger, Did you get it to work with a network camera and do motion detection? I get down to the following line in the verbose log output, and then it exits.... [NTC][ALL][00:ml00:Front Door] mlp_init: Camera 1 started: motion detection Enabled I built motionplus as a docker image and put it here: <https://hub.docker.com/r/crcinau/motionplus> I'm also building motion as a docker image here: <https://hub.docker.com/r/crcinau/motion> That works perfectly :) -- Steven Haigh ? net...@crc.id.au <mailto:net...@crc.id.au> ? https://crc.id.au <https://www.crc.id.au/> On Tue, Jul 4 2023 at 16:56:13 +0000, Roger McCalman <motion-user-...@mccalman.org> wrote: > Hi, > > > I have been using motion on FreeBSD for some time now and thought I > would give motion plus a try. I couldn?t see a port for it so I > clone the git repo and compiled it after some minor changes. The > changes are below if anyone is interested. These look like they are > not FreeBSD specific, just compiler warnings and errors. > > I have tested only with network cameras so far. > > Cheers, Roger > > *diff --git a/src/conf.cpp b/src/conf.cpp* > > *index 1637541..f3f5e84 100644* > > *--- a/src/conf.cpp* > > *+++ b/src/conf.cpp* > > @@ -4008,7 +4008,7 @@void conf_parms_write_app(ctx_motapp *motapp) > > if (conffile == NULL) { > > MOTPLS_LOG(NTC, TYPE_ALL, NO_ERRNO > > , _("Failed to write configuration to %s") > > - , motapp->conf->conf_filename); > > + , motapp->conf->conf_filename.c_str()); > > return; > > } > > > > *diff --git a/src/netcam.cpp b/src/netcam.cpp* > > *index 0d277f2..2d6fcc3 100644* > > *--- a/src/netcam.cpp* > > *+++ b/src/netcam.cpp* > > @@ -1441,7 +1441,7 @@static void netcam_set_path (ctx_dev *cam, > ctx_netcam *netcam ) > > netcam->path = NULL; > > > > memset(&url, 0, sizeof(url)); > > - memset(userpass,0,PATH_MAX); > > + memset(userpass,0,sizeof(userpass)); > > > > if (netcam->high_resolution) { > > netcam_url_parse(&url, cam->conf->netcam_high_url.c_str()); > > @@ -1451,8 +1451,8 @@static void netcam_set_path (ctx_dev *cam, > ctx_netcam *netcam ) > > > > if (cam->conf->netcam_userpass != "") { > > cam->conf->netcam_userpass.copy(userpass, PATH_MAX); > > - } else if (url.userpass != NULL) { > > - retcd = snprintf(userpass,PATH_MAX,"%s",url.userpass); > > + } else if (url.userpass) { > > + retcd = > snprintf(userpass,sizeof(userpass),"%s",url.userpass); > > if ((retcd <0) || (retcd>=PATH_MAX)) { > > [roger@dev2 motionplus]$git diff | cat > > diff --git a/src/conf.cpp b/src/conf.cpp > > index 1637541..f3f5e84 100644 > > --- a/src/conf.cpp > > +++ b/src/conf.cpp > > @@ -4008,7 +4008,7 @@ void conf_parms_write_app(ctx_motapp *motapp) > > if (conffile == NULL) { > > MOTPLS_LOG(NTC, TYPE_ALL, NO_ERRNO > > , _("Failed to write configuration to %s") > > - , motapp->conf->conf_filename); > > + , motapp->conf->conf_filename.c_str()); > > return; > > } > > > > diff --git a/src/netcam.cpp b/src/netcam.cpp > > index 0d277f2..2d6fcc3 100644 > > --- a/src/netcam.cpp > > +++ b/src/netcam.cpp > > @@ -1441,7 +1441,7 @@ static void netcam_set_path (ctx_dev *cam, > ctx_netcam *netcam ) > > netcam->path = NULL; > > > > memset(&url, 0, sizeof(url)); > > - memset(userpass,0,PATH_MAX); > > + memset(userpass,0,sizeof(userpass)); > > > > if (netcam->high_resolution) { > > netcam_url_parse(&url, cam->conf->netcam_high_url.c_str()); > > @@ -1451,8 +1451,8 @@ static void netcam_set_path (ctx_dev *cam, > ctx_netcam *netcam ) > > > > if (cam->conf->netcam_userpass != "") { > > cam->conf->netcam_userpass.copy(userpass, PATH_MAX); > > - } else if (url.userpass != NULL) { > > - retcd = snprintf(userpass,PATH_MAX,"%s",url.userpass); > > + } else if (url.userpass) { > > + retcd = > snprintf(userpass,sizeof(userpass),"%s",url.userpass); > > if ((retcd <0) || (retcd>=PATH_MAX)) { > > MOTPLS_LOG(INF, TYPE_NETCAM, NO_ERRNO,_("Error getting > userpass")); > > } > > @@ -1471,7 +1471,7 @@ static void netcam_set_path (ctx_dev *cam, > ctx_netcam *netcam ) > > } else { > > MOTPLS_LOG(INF, TYPE_NETCAM, NO_ERRNO > > ,_("Setting up %s "),url.service); > > - if (userpass != NULL) { > > + if (strlen(userpass)) { > > netcam->path =(char*) mymalloc(strlen(url.service) + 3 + > strlen(userpass) > > + 1 + strlen(url.host) + 6 + strlen(url.path) + 2 > ); > > sprintf((char *)netcam->path, "%s://%s@%s:%d%s", > -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ ------------------------------ Subject: Digest Footer _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user ------------------------------ End of Motion-user Digest, Vol 203, Issue 5 *******************************************