[PR #1048] [MERGED] frpc: fixup ini config parse problem in sub command status and `rel… #4304

Closed
opened 2026-05-05 14:39:32 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/1048
Author: @ttys3
Created: 1/16/2019
Status: Merged
Merged: 1/16/2019
Merged by: @fatedier

Base: devHead: frpc-fixup-sub-command-status-and-reload-ini-parse-problem


📝 Commits (1)

  • a2ccb6c frpc: fixup ini config parse problem in sub command status and reload.

📊 Changes

2 files changed (+16 additions, -2 deletions)

View changed files

📝 cmd/frpc/sub/reload.go (+8 -1)
📝 cmd/frpc/sub/status.go (+8 -1)

📄 Description

frpc: fixup ini config parse problem in sub command status and reload

problem:
when run frpc -c /path-to/frpc.ini status or frpc -c /path-to/frpc.ini reload,
we'll get the error result:

parse ini conf file error: invalid INI syntax on line 1: /path-to/frpc.ini

since func parseClientCommonCfg(fileType int, content string) (err error)
only accept file content, not a filename.

we should call config.GetRenderedConfFromFile first to avoid the problem.
just like the code in cmd/frpc/sub/root.go:

	content, err = config.GetRenderedConfFromFile(cfgFilePath)
	if err != nil {
		return
	}
	g.GlbClientCfg.CfgFile = cfgFilePath

	err = parseClientCommonCfg(CfgFileTypeIni, content)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fatedier/frp/pull/1048 **Author:** [@ttys3](https://github.com/ttys3) **Created:** 1/16/2019 **Status:** ✅ Merged **Merged:** 1/16/2019 **Merged by:** [@fatedier](https://github.com/fatedier) **Base:** `dev` ← **Head:** `frpc-fixup-sub-command-status-and-reload-ini-parse-problem` --- ### 📝 Commits (1) - [`a2ccb6c`](https://github.com/fatedier/frp/commit/a2ccb6c190acbd26de5d29d2c21bc53b39032ded) frpc: fixup ini config parse problem in sub command `status` and `reload`. ### 📊 Changes **2 files changed** (+16 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `cmd/frpc/sub/reload.go` (+8 -1) 📝 `cmd/frpc/sub/status.go` (+8 -1) </details> ### 📄 Description frpc: fixup ini config parse problem in sub command `status` and `reload` problem: when run `frpc -c /path-to/frpc.ini status` or `frpc -c /path-to/frpc.ini reload`, we'll get the error result: > parse ini conf file error: invalid INI syntax on line 1: /path-to/frpc.ini since `func parseClientCommonCfg(fileType int, content string) (err error)` only accept **file content**, not a **filename**. we should call `config.GetRenderedConfFromFile` first to avoid the problem. just like the code in cmd/frpc/sub/root.go: ```go content, err = config.GetRenderedConfFromFile(cfgFilePath) if err != nil { return } g.GlbClientCfg.CfgFile = cfgFilePath err = parseClientCommonCfg(CfgFileTypeIni, content) ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 14:39:32 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#4304
No description provided.