SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
27
net/rtg/patches/patch-src_rtgutil_c
Normal file
27
net/rtg/patches/patch-src_rtgutil_c
Normal file
|
@ -0,0 +1,27 @@
|
|||
Index: src/rtgutil.c
|
||||
--- src/rtgutil.c.orig
|
||||
+++ src/rtgutil.c
|
||||
@@ -34,6 +34,7 @@ int read_rtg_config(char *file, config_t * set)
|
||||
else if (!strcasecmp(p1, "SNMP_Port")) set->snmp_port = atoi(p2);
|
||||
else if (!strcasecmp(p1, "Threads")) set->threads = atoi(p2);
|
||||
else if (!strcasecmp(p1, "DB_Host")) strncpy(set->dbhost, p2, sizeof(set->dbhost));
|
||||
+ else if (!strcasecmp(p1, "DB_Port")) set->dbport = atoi(p2);
|
||||
else if (!strcasecmp(p1, "DB_Database")) strncpy(set->dbdb, p2, sizeof(set->dbdb));
|
||||
else if (!strcasecmp(p1, "DB_User")) strncpy(set->dbuser, p2, sizeof(set->dbuser));
|
||||
else if (!strcasecmp(p1, "DB_Pass")) strncpy(set->dbpass, p2, sizeof(set->dbpass));
|
||||
@@ -87,6 +88,7 @@ int write_rtg_config(char *file, config_t * set)
|
||||
fprintf(fp, "SNMP_Ver\t%d\n", set->snmp_ver);
|
||||
fprintf(fp, "SNMP_Port\t%d\n", set->snmp_port);
|
||||
fprintf(fp, "DB_Host\t%s\n", set->dbhost);
|
||||
+ fprintf(fp, "DB_Port\t%s\n", set->dbport);
|
||||
fprintf(fp, "DB_Database\t%s\n", set->dbdb);
|
||||
fprintf(fp, "DB_User\t%s\n", set->dbuser);
|
||||
fprintf(fp, "DB_Pass\t%s\n", set->dbpass);
|
||||
@@ -108,6 +110,7 @@ void config_defaults(config_t * set)
|
||||
set->snmp_port = DEFAULT_SNMP_PORT;
|
||||
set->threads = DEFAULT_THREADS;
|
||||
strncpy(set->dbhost, DEFAULT_DB_HOST, sizeof(set->dbhost));
|
||||
+ set->dbport = DEFAULT_DB_PORT;
|
||||
strncpy(set->dbdb, DEFAULT_DB_DB, sizeof(set->dbhost));
|
||||
strncpy(set->dbuser, DEFAULT_DB_USER, sizeof(set->dbhost));
|
||||
strncpy(set->dbpass, DEFAULT_DB_PASS, sizeof(set->dbhost));
|
Loading…
Add table
Add a link
Reference in a new issue