diff options
| author | Jiri Moskovcak <jmoskovc@localhost.localdomain> | 2009-11-18 15:51:49 +0100 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@localhost.localdomain> | 2009-11-18 15:51:49 +0100 |
| commit | b6a34a21048ca7edfa913e8c5ee094f4cb85503f (patch) | |
| tree | d1b768d95fbbf2904edd8ac4fb8f6e977841d5c9 /lib | |
| parent | dfcf49e5a3d80fcf61bd4dbac4f8d95d45996278 (diff) | |
| parent | 344a3dcc7a22e0e5dd74fe0bfb0483220c3dc7ad (diff) | |
| download | abrt-b6a34a21048ca7edfa913e8c5ee094f4cb85503f.tar.gz abrt-b6a34a21048ca7edfa913e8c5ee094f4cb85503f.tar.xz abrt-b6a34a21048ca7edfa913e8c5ee094f4cb85503f.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Plugins/CCpp.cpp | 2 | ||||
| -rw-r--r-- | lib/Plugins/Firefox.cpp | 2 | ||||
| -rw-r--r-- | lib/Plugins/RunApp.cpp | 4 | ||||
| -rw-r--r-- | lib/Utils/CommLayerInner.cpp | 2 | ||||
| -rw-r--r-- | lib/Utils/make_descr.cpp | 2 | ||||
| -rw-r--r-- | lib/Utils/stringops.cpp | 25 |
6 files changed, 24 insertions, 13 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index da6ff98..49a9e4a 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -903,7 +903,7 @@ void CAnalyzerCCpp::CreateReport(const char *pDebugDumpDir, int force) std::string build_ids; if (m_bInstallDebugInfo && DebuginfoCheckPolkit(atoi(UID.c_str()))) { - if (m_nDebugInfoCacheMB > 0) + if (m_nDebugInfoCacheMB > 0) trim_debuginfo_cache(m_nDebugInfoCacheMB); InstallDebugInfos(pDebugDumpDir, build_ids); } diff --git a/lib/Plugins/Firefox.cpp b/lib/Plugins/Firefox.cpp index 6741ff3..68dbd39 100644 --- a/lib/Plugins/Firefox.cpp +++ b/lib/Plugins/Firefox.cpp @@ -903,7 +903,7 @@ void CAnalyzerFirefox::CreateReport(const char *pDebugDumpDir, int force) std::string build_ids; if (m_bInstallDebugInfo && DebuginfoCheckPolkit(atoi(UID.c_str()))) { - if (m_nDebugInfoCacheMB > 0) + if (m_nDebugInfoCacheMB > 0) trim_debuginfo_cache(m_nDebugInfoCacheMB); InstallDebugInfos(pDebugDumpDir, build_ids); } diff --git a/lib/Plugins/RunApp.cpp b/lib/Plugins/RunApp.cpp index a2aa698..f7cbc01 100644 --- a/lib/Plugins/RunApp.cpp +++ b/lib/Plugins/RunApp.cpp @@ -52,6 +52,7 @@ void CActionRunApp::Run(const char *pActionDir, const char *pArgs) */ //Can do it using chdir() in child if we'd open-code popen string cd_and_cmd = ssprintf("cd '%s'; %s", pActionDir, cmd); + VERB1 log("RunApp: executing '%s'", cd_and_cmd.c_str()); FILE *fp = popen(cd_and_cmd.c_str(), "r"); if (fp == NULL) { @@ -65,7 +66,8 @@ void CActionRunApp::Run(const char *pActionDir, const char *pArgs) char line[1024]; while (fgets(line, 1024, fp) != NULL) { - output += line; + if (args.size() > FILENAME) + output += line; } pclose(fp); diff --git a/lib/Utils/CommLayerInner.cpp b/lib/Utils/CommLayerInner.cpp index 307fe66..133e97d 100644 --- a/lib/Utils/CommLayerInner.cpp +++ b/lib/Utils/CommLayerInner.cpp @@ -72,7 +72,7 @@ void update_client(const char *fmt, ...) int used = vasprintf(&msg, fmt, p); va_end(p); if (used < 0) - return; + return; s_pObs->Status(msg, peer, key); } diff --git a/lib/Utils/make_descr.cpp b/lib/Utils/make_descr.cpp index 1352149..0c09614 100644 --- a/lib/Utils/make_descr.cpp +++ b/lib/Utils/make_descr.cpp @@ -75,7 +75,7 @@ string make_description_bz(const map_crash_report_t& pCrashReport) && filename != FILENAME_RELEASE && filename != CD_REPRODUCE && filename != CD_COMMENT - ) { + ) { add_content(was_multiline, description, filename.c_str(), content.c_str()); } } diff --git a/lib/Utils/stringops.cpp b/lib/Utils/stringops.cpp index 1b3793f..dc71b5b 100644 --- a/lib/Utils/stringops.cpp +++ b/lib/Utils/stringops.cpp @@ -3,24 +3,33 @@ void parse_args(const char *psArgs, vector_string_t& pArgs, int quote) { unsigned ii; - bool is_quote = false; + bool inside_quotes = false; std::string item; for (ii = 0; psArgs[ii]; ii++) { - if (quote != -1 && psArgs[ii] == quote) + if (quote != -1) { - is_quote = !is_quote; + if (psArgs[ii] == quote) + { + inside_quotes = !inside_quotes; + continue; + } + /* inside quotes we support escaping with \x */ + if (inside_quotes && psArgs[ii] == '\\' && psArgs[ii+1]) + { + ii++; + item += psArgs[ii]; + continue; + } } - else if (psArgs[ii] == ',' && !is_quote) + if (psArgs[ii] == ',' && !inside_quotes) { pArgs.push_back(item); item.clear(); + continue; } - else - { - item += psArgs[ii]; - } + item += psArgs[ii]; } if (item.size() != 0) |
