Displaying 6 results from an estimated 6 matches for "pidfn".
Did you mean:
piden
2011 Aug 27
1
[PATCH 1/3] Fix file descriptor leak
...osch <thomas.jarosch at intra2net.com>
---
common/common.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/common/common.c b/common/common.c
index f443cb7..e8004d7 100644
--- a/common/common.c
+++ b/common/common.c
@@ -244,6 +244,7 @@ int sendsignalfn(const char *pidfn, int sig)
if (fgets(buf, sizeof(buf), pidf) == NULL) {
upslogx(LOG_NOTICE, "Failed to read pid from %s", pidfn);
+ fclose(pidf);
return -1;
}
@@ -251,6 +252,7 @@ int sendsignalfn(const char *pidfn, int sig)
if (pid < 2) {
upslogx(LOG_NOTICE, "Ignoring invali...
2010 Jul 21
1
[PATCH] nut crashes when port= is omitted
...name (file=0x0) at common.c:266
#2 stop_driver (ups=0x1e163e0) at upsdrvctl.c:135
#3 send_all_drivers (command=0x4020f0 <stop_driver>) at upsdrvctl.c:446
#4 main (argc=1, argv=0x7ffff30be9c0) at upsdrvctl.c:565
stop_driver (ups=0x1e163e0) at upsdrvctl.c:135:
if (ret != 0) {
snprintf(pidfn, sizeof(pidfn), "%s/%s-%s.pid", altpidpath(),
ups->driver, xbasename(ups->port));
ret = stat(pidfn, &fs);
}
ups->port is NULL which makes xbasename(NULL) crash. Seems this is the only
problem with wrong configuration. During quick testing I did not find any other
sen...
2007 Jan 06
1
Re: [nut-commits] svn commit r710 - in trunk: . clients server
...f(" -6 IPv6 only\n");
> +#endif
>
> exit(EXIT_SUCCESS);
> }
> @@ -784,11 +845,19 @@
> datapath = xstrdup(DATADIR);
>
> /* set up some things for later */
> +#ifndef HAVE_IPV6
> +
> + listenaddr.s_addr = INADDR_ANY;
> +#endif
> snprintf(pidfn, sizeof(pidfn), "%s/upsd.pid", altpidpath());
>
> printf("Network UPS Tools upsd %s\n", UPS_VERSION);
>
> +#ifndef HAVE_IPV6
> + while ((i = getopt(argc, argv, "+hp:r:i:fu:Vc:D")) != EOF) {
> +#else
> while ((i = getopt(argc, argv, "+h...
2007 May 25
0
Patch -- SVN revision in the version string
...rsion());
}
void net_help(ctype_t *client, int numarg, const char **arg)
Index: server/upsd.c
===================================================================
--- server/upsd.c (revision 916)
+++ server/upsd.c (working copy)
@@ -971,7 +971,7 @@
/* set up some things for later */
snprintf(pidfn, sizeof(pidfn), "%s/upsd.pid", altpidpath());
- printf("Network UPS Tools upsd %s\n", UPS_VERSION);
+ printf("Network UPS Tools upsd %s\n", upsversion());
while ((i = getopt(argc, argv, "+h46p:r:i:fu:Vc:D")) != -1) {
switch (i) {
End of diffs.
-----...
2007 Jan 06
3
Re: [nut-commits] svn commit r708 - in trunk: . clients server
...rintf(" -4 IPv4 only\n");
> + printf(" -6 IPv6 only\n");
>
> exit(EXIT_SUCCESS);
> }
> @@ -737,13 +784,11 @@
> datapath = xstrdup(DATADIR);
>
> /* set up some things for later */
> -
> - listenaddr.s_addr = INADDR_ANY;
> snprintf(pidfn, sizeof(pidfn), "%s/upsd.pid", altpidpath());
>
> printf("Network UPS Tools upsd %s\n", UPS_VERSION);
>
> - while ((i = getopt(argc, argv, "+hp:r:i:fu:Vc:D")) != EOF) {
> + while ((i = getopt(argc, argv, "+h46p:r:i:fu:Vc:D")) != EOF) {
&g...
2007 Jan 23
2
Re: [nut-commits] svn commit r731
...uct passwd *new_uid = NULL;
> + stype *serv;
>
> progname = argv[0];
>
> @@ -845,34 +941,20 @@
> datapath = xstrdup(DATADIR);
>
> /* set up some things for later */
> -#ifndef HAVE_IPV6
> -
> - listenaddr.s_addr = INADDR_ANY;
> -#endif
> snprintf(pidfn, sizeof(pidfn), "%s/upsd.pid", altpidpath());
>
> printf("Network UPS Tools upsd %s\n", UPS_VERSION);
>
> -#ifndef HAVE_IPV6
> - while ((i = getopt(argc, argv, "+hp:r:i:fu:Vc:D")) != EOF) {
> -#else
> while ((i = getopt(argc, argv, "+h...