diff options
| author | Karel Klic <kklic@redhat.com> | 2009-11-12 15:27:35 +0100 |
|---|---|---|
| committer | Karel Klic <kklic@redhat.com> | 2009-11-12 15:27:35 +0100 |
| commit | 43761c9351636628da1c37035fa2dcea523cfa80 (patch) | |
| tree | dd444131dd32020f3cf12d018a48a814aee4cace /lib/Plugins/SOSreport.cpp | |
| parent | cb3c80e309ca3d679a381ec419ec8658a6109144 (diff) | |
| parent | 9b5293641cdc39bb33b39f6773c0537700514f4e (diff) | |
| download | abrt-43761c9351636628da1c37035fa2dcea523cfa80.tar.gz abrt-43761c9351636628da1c37035fa2dcea523cfa80.tar.xz abrt-43761c9351636628da1c37035fa2dcea523cfa80.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Plugins/SOSreport.cpp')
| -rw-r--r-- | lib/Plugins/SOSreport.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/lib/Plugins/SOSreport.cpp b/lib/Plugins/SOSreport.cpp index fedc51a..b949339 100644 --- a/lib/Plugins/SOSreport.cpp +++ b/lib/Plugins/SOSreport.cpp @@ -65,36 +65,6 @@ static std::string ParseFilename(const std::string& pOutput) return pOutput.substr(filename_start, filename_end - filename_start + 1); } -/* TODO: do not duplicate: RunApp.cpp has same function too */ -static void ParseArgs(const char *psArgs, vector_string_t& pArgs) -{ - unsigned ii; - bool is_quote = false; - std::string item; - - for (ii = 0; psArgs[ii]; ii++) - { - if (psArgs[ii] == '"') - { - is_quote = !is_quote; - } - else if (psArgs[ii] == ',' && !is_quote) - { - pArgs.push_back(item); - item.clear(); - } - else - { - item += psArgs[ii]; - } - } - - if (item.size() != 0) - { - pArgs.push_back(item); - } -} - void CActionSOSreport::Run(const char *pActionDir, const char *pArgs) { update_client(_("Executing SOSreport plugin...")); @@ -108,7 +78,7 @@ void CActionSOSreport::Run(const char *pActionDir, const char *pArgs) std::string command; vector_string_t args; - ParseArgs(pArgs, args); + parse_args(pArgs, args, '"'); if (args.size() == 0 || args[0] == "") { |
