ALT Linux repositórios
Group :: Sistema/Servidores
RPM: nut
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: nut-2.0.1-alt-upsstats.patch
Download
Download
--- nut-2.0.1/clients/upsstats.c.orig 2003-09-30 08:50:10 +0400
+++ nut-2.0.1/clients/upsstats.c 2005-03-05 04:28:33 +0300
@@ -301,6 +301,9 @@ static void ups_connect(void)
char *newups, *newhost;
int newport;
+ if (!currups)
+ return;
+
/* try to minimize reconnects */
if (lastups) {
@@ -615,8 +618,9 @@ static int parse_line(const char *buf)
/* if not in a for, ignore this */
if (forofs == 0)
return 1;
-
- currups = currups->next;
+
+ if (currups)
+ currups = currups->next;
if (currups) {
fseek(tf, forofs, SEEK_SET);