[Libreoffice-commits] .: 2 commits - crashrep/source
Caolán McNamara
caolan at kemper.freedesktop.org
Sat Apr 21 13:43:14 PDT 2012
crashrep/source/unx/main.cxx | 33 ++++++++++-----------------------
1 file changed, 10 insertions(+), 23 deletions(-)
New commits:
commit 461b786be77a2116673915d56e1bf875cac792b5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Apr 21 21:42:18 2012 +0100
make comment reflect reality
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index d4c17bd..493c21f 100644
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -1032,38 +1032,17 @@ static bool setup_version()
return 0 != g_strReportServer.length();
}
-#if 0
-// Use gconftool-2 to determine if gnome accessiblity is enabled
-// unused
-static bool get_accessibility_state()
-{
- bool bAccessible = false;
- FILE *fin = popen( "gconftool-2 -g /desktop/gnome/interface/accessibility", "r");
-
- if ( fin )
- {
- char buffer[sizeof("true")];
-
- bAccessible = fgets( buffer, sizeof(buffer), fin ) && 0 == strcmp( buffer, "true" );
-
- pclose( fin );
- }
-
- return bAccessible;
-}
-#endif
-
int main( int argc, char** argv )
{
FILE *fin = freopen( "/dev/null", "w", stderr );
- if (!fin)
+ if (!fin)
{
return -1;
}
setup_program_dir( argv[0] );
- // Don't start if accessiblity is enabled or report server is not given
+ // Don't start if report server is not given
if ( setup_version() )
{
commit ad4f72560627a2d75c71a34f2a37ab1f5a2bf05d
Author: David Ostrovsky <David.Ostrovsky at gmx.de>
Date: Sat Apr 21 14:27:43 2012 +0200
WaE: crashrep warnings fixed
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index f9a6320..d4c17bd 100644
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -592,7 +592,11 @@ static void setup_program_dir( const char* progname )
g_strProgramDir = aDir.substr( 0, pos + 1 );
aDir.erase( pos );
- chdir( aDir.c_str() );
+ int ret = chdir( aDir.c_str() );
+ if (!ret)
+ {
+ return;
+ }
}
}
@@ -1051,7 +1055,11 @@ static bool get_accessibility_state()
int main( int argc, char** argv )
{
- freopen( "/dev/null", "w", stderr );
+ FILE *fin = freopen( "/dev/null", "w", stderr );
+ if (!fin)
+ {
+ return -1;
+ }
setup_program_dir( argv[0] );
More information about the Libreoffice-commits
mailing list