diff options
Diffstat (limited to 'dcop')
-rw-r--r-- | dcop/CMakeLists.txt | 6 | ||||
-rw-r--r-- | dcop/KDE-ICE/Xtrans.c | 4 | ||||
-rw-r--r-- | dcop/KDE-ICE/Xtranssock.c | 10 | ||||
-rw-r--r-- | dcop/KDE-ICE/iceauth.c | 4 | ||||
-rw-r--r-- | dcop/KDE-ICE/misc.c | 16 | ||||
-rw-r--r-- | dcop/client/dcop.cpp | 107 | ||||
-rw-r--r-- | dcop/dcopclient.cpp | 31 | ||||
-rw-r--r-- | dcop/dcopidl/scanner.cc | 38 | ||||
-rw-r--r-- | dcop/dcopidlng/kalyptus | 18 | ||||
-rw-r--r-- | dcop/dcopidlng/kalyptusCxxToDcopIDL.pm | 27 | ||||
-rw-r--r-- | dcop/dcopidlng/kdocAstUtil.pm | 8 | ||||
-rw-r--r-- | dcop/dcopidlng/kdocParseDoc.pm | 12 | ||||
-rw-r--r-- | dcop/dcopserver.cpp | 6 | ||||
-rw-r--r-- | dcop/dcopserver_shutdown.c | 2 | ||||
-rw-r--r-- | dcop/tests/run-tests.sh | 6 |
15 files changed, 180 insertions, 115 deletions
diff --git a/dcop/CMakeLists.txt b/dcop/CMakeLists.txt index 8a69361f7..783035805 100644 --- a/dcop/CMakeLists.txt +++ b/dcop/CMakeLists.txt @@ -30,6 +30,12 @@ link_directories( ) +##### Define where your dcop binary is ########## + +set( DCOP_PATH "${BIN_INSTALL_DIR}" ) +configure_file( dcop-path.h.cmake dcop-path.h ) + + ##### headers ################################### install( FILES diff --git a/dcop/KDE-ICE/Xtrans.c b/dcop/KDE-ICE/Xtrans.c index b954d4b3b..e34574248 100644 --- a/dcop/KDE-ICE/Xtrans.c +++ b/dcop/KDE-ICE/Xtrans.c @@ -1261,7 +1261,7 @@ static int TRANS(ReadV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) len = iov->iov_len; base = iov->iov_base; while (len > 0) { - register int nbytes; + int nbytes; nbytes = TRANS(Read) (ciptr, base, len); if (nbytes < 0 && total == 0) return -1; if (nbytes <= 0) return total; @@ -1293,7 +1293,7 @@ static int TRANS(WriteV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) len = iov->iov_len; base = iov->iov_base; while (len > 0) { - register int nbytes; + int nbytes; nbytes = TRANS(Write) (ciptr, base, len); if (nbytes < 0 && total == 0) return -1; if (nbytes <= 0) return total; diff --git a/dcop/KDE-ICE/Xtranssock.c b/dcop/KDE-ICE/Xtranssock.c index bb6d122bc..31a35fcd9 100644 --- a/dcop/KDE-ICE/Xtranssock.c +++ b/dcop/KDE-ICE/Xtranssock.c @@ -47,6 +47,10 @@ from The Open Group. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <ctype.h> #include <unistd.h> #include <stdlib.h> @@ -873,7 +877,7 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port) else sockname.sin_port = htons (0); -#ifdef BSD44SOCKETS +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sockname.sin_len = sizeof (sockname); #endif sockname.sin_family = AF_INET; @@ -947,7 +951,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port) } namelen = sizeof( sockname ) - sizeof( sockname.sun_path ) + strlen( sockname.sun_path ) + 1; -#if defined(BSD44SOCKETS) +#if defined(HAVE_STRUCT_SOCKADDR_UN_SUN_LEN) sockname.sun_len = namelen; #endif @@ -1278,7 +1282,7 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port) * Build the socket name. */ -#ifdef BSD44SOCKETS +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sockname.sin_len = sizeof (struct sockaddr_in); #endif sockname.sin_family = AF_INET; diff --git a/dcop/KDE-ICE/iceauth.c b/dcop/KDE-ICE/iceauth.c index 72297ceb5..609615643 100644 --- a/dcop/KDE-ICE/iceauth.c +++ b/dcop/KDE-ICE/iceauth.c @@ -45,7 +45,7 @@ extern Time_t time (); #define Time_t time_t #endif -static int binaryEqual (register const char *a, register const char *b, register unsigned len); +static int binaryEqual (const char *a, const char *b, unsigned len); static int was_called_state; @@ -264,7 +264,7 @@ char **errorStringRet; * local routines */ -static int binaryEqual (register const char *a, register const char *b, register unsigned len) +static int binaryEqual (const char *a, const char *b, unsigned len) { while (len--) if (*a++ != *b++) diff --git a/dcop/KDE-ICE/misc.c b/dcop/KDE-ICE/misc.c index 0dbbf24b7..4658b8d14 100644 --- a/dcop/KDE-ICE/misc.c +++ b/dcop/KDE-ICE/misc.c @@ -233,12 +233,12 @@ IceConn iceConn; Status _IceRead (iceConn, nbytes, ptr) -register IceConn iceConn; +IceConn iceConn; unsigned long nbytes; -register char *ptr; +char *ptr; { - register unsigned long nleft; + unsigned long nleft; nleft = nbytes; while (nleft > 0) @@ -335,8 +335,8 @@ register char *ptr; void _IceReadSkip (iceConn, nbytes) -register IceConn iceConn; -register unsigned long nbytes; +IceConn iceConn; +unsigned long nbytes; { char temp[512]; @@ -359,12 +359,12 @@ register unsigned long nbytes; void _IceWrite (iceConn, nbytes, ptr) -register IceConn iceConn; +IceConn iceConn; unsigned long nbytes; -register char *ptr; +char *ptr; { - register unsigned long nleft; + unsigned long nleft; nleft = nbytes; while (nleft > 0) diff --git a/dcop/client/dcop.cpp b/dcop/client/dcop.cpp index 5a76b8193..48cf02ec4 100644 --- a/dcop/client/dcop.cpp +++ b/dcop/client/dcop.cpp @@ -590,69 +590,76 @@ int runDCOP( QCStringList args, UserList users, Session session, } } - if( users.count() > 1 || ( users.count() == 1 && - ( getenv( "ICEAUTHORITY" ) == 0 || getenv( "DISPLAY" ) == 0 ) ) ) + if ((users.count() > 1) || ((users.count() == 1) && + ((getenv("ICEAUTHORITY") == 0) || (getenv("DISPLAY") == 0)))) { - // Check for ICE authority file and if the file can be read by us - TQString iceFileBase = "ICEauthority"; - TQString iceFile; - TQFileInfo fi; + // Check for ICE authority file and if the file can be read by us + TQString iceFileBase = "ICEauthority"; + TQString iceFile; + TQFileInfo fi; - if (getenv("XDG_RUNTIME_DIR") != 0 ) - { - TQFileInfo xdgRuntime(getenv("XDG_RUNTIME_DIR")); - passwd* pstruct = getpwnam(it.key().local8Bit()); - if (pstruct) + TQString xdgRuntimeDir = TQString::fromLocal8Bit(getenv("XDG_RUNTIME_DIR")); + if (xdgRuntimeDir.isEmpty()) { - iceFile = TQString("%1/%2/%3").arg(xdgRuntime.dirPath()).arg(pstruct->pw_uid).arg(iceFileBase); - fi.setFile(iceFile); + xdgRuntimeDir = "/run/user/<uid>"; } - if (!pstruct || !fi.exists()) + if (!xdgRuntimeDir.isEmpty()) { - iceFile = TQString::null; + TQFileInfo xdgRuntime(xdgRuntimeDir); + passwd* pstruct = getpwnam(it.key().local8Bit()); + if (pstruct) + { + iceFile = TQString("%1/%2/%3").arg(xdgRuntime.dirPath()).arg(pstruct->pw_uid).arg(iceFileBase); + fi.setFile(iceFile); + } + if (!pstruct || !fi.exists()) + { + iceFile = TQString::null; + } } - } - if (iceFile.isEmpty()) - { - iceFile = TQString("%1/.%2").arg(it.data()).arg(iceFileBase); - fi.setFile(iceFile); - } - if( iceFile.isEmpty() ) - { - cerr_ << "WARNING: Cannot determine home directory for user " - << it.key() << "!" << endl - << "Please check permissions or set the $ICEAUTHORITY variable manually before" << endl - << "calling dcop." << endl; - } - else if( fi.exists() ) - { - if( fi.isReadable() ) + if (iceFile.isEmpty()) { - char *envStr = strdup( ( "ICEAUTHORITY=" + iceFile ).ascii() ); - putenv( envStr ); - //cerr_ << "ice: " << envStr << endl; + iceFile = TQString("%1/.%2").arg(it.data()).arg(iceFileBase); + fi.setFile(iceFile); } - else + if (iceFile.isEmpty()) { - cerr_ << "WARNING: ICE authority file " << iceFile - << "is not readable by you!" << endl - << "Please check permissions or set the $ICEAUTHORITY variable manually before" << endl - << "calling dcop." << endl; + cerr_ << "WARNING: Cannot determine home directory for user " + << it.key() << "!" << endl + << "Please check permissions or set the $ICEAUTHORITY variable manually before" << endl + << "calling dcop." << endl; + } + else if (fi.exists()) + { + if (fi.isReadable()) + { + char *envStr = strdup(("ICEAUTHORITY=" + iceFile).local8Bit()); + putenv(envStr); + //cerr_ << "ice: " << envStr << endl; + } + else + { + cerr_ << "WARNING: ICE authority file " << iceFile + << "is not readable by you!" << endl + << "Please check permissions or set the $ICEAUTHORITY variable manually before" << endl + << "calling dcop." << endl; + } } - } - else - { - if( users.count() > 1 ) - continue; else { - cerr_ << "WARNING: Cannot find ICE authority file " - << iceFile << "!" << endl - << "Please check permissions or set the $ICEAUTHORITY" - << " variable manually before" << endl - << "calling dcop." << endl; + if (users.count() > 1) + { + continue; + } + else + { + cerr_ << "WARNING: Cannot find ICE authority file " + << iceFile << "!" << endl + << "Please check permissions or set the $ICEAUTHORITY" + << " variable manually before" << endl + << "calling dcop." << endl; + } } - } } // Main loop diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp index 6a740e2ff..ed9594c6a 100644 --- a/dcop/dcopclient.cpp +++ b/dcop/dcopclient.cpp @@ -41,6 +41,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <sys/stat.h> #include <sys/file.h> #include <sys/socket.h> +#include <sys/un.h> #include <fcntl.h> #include <unistd.h> @@ -212,13 +213,26 @@ public: TQCString DCOPClient::iceauthPath() { -#ifdef Q_OS_WIN32 +#if defined(ICEAUTH_PATH) + if ( +# if defined(Q_WS_WIN) + access(ICEAUTH_PATH, 0) == 0 +# else + access(ICEAUTH_PATH, X_OK) == 0 +# endif + ) + { + return TQCString(ICEAUTH_PATH); + } + +#elif defined(Q_OS_WIN32) char szPath[512]; char * pszFilePart; int ret; ret = SearchPathA(NULL,"iceauth.exe",NULL,sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart); if(ret != 0) return TQCString(szPath); + #else TQCString path = ::getenv("PATH"); if (path.isEmpty()) @@ -232,9 +246,9 @@ TQCString DCOPClient::iceauthPath() { return fPath; } - fPath = strtok(NULL, ":\b"); } + #endif return 0; } @@ -713,10 +727,12 @@ bool DCOPClient::isSuspended() const return !d->notifier->isEnabled(); } -#ifdef SO_PEERCRED +#if defined(SO_PEERCRED) || defined(LOCAL_PEEREID) +#define USE_PEER_IS_US // Check whether the remote end is owned by the same user. static bool peerIsUs(int sockfd) { +#ifdef SO_PEERCRED #if defined(__OpenBSD__) struct sockpeercred cred; #else @@ -726,6 +742,13 @@ static bool peerIsUs(int sockfd) if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &cred, &siz) != 0) return false; return (cred.uid == getuid()); +#elif defined LOCAL_PEEREID + struct unpcbid cred; + socklen_t siz = sizeof(cred); + if (getsockopt(sockfd, 0, LOCAL_PEEREID, &cred, &siz) != 0 || siz != sizeof(cred)) + return false; + return (cred.unp_euid == geteuid()); +#endif } #else // Check whether the socket is owned by the same user. @@ -871,7 +894,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) return false; } -#ifdef SO_PEERCRED +#ifdef USE_PEER_IS_US d->foreign_server = !peerIsUs(socket()); #else d->foreign_server = !isServerSocketOwnedByUser(d->serverAddr); diff --git a/dcop/dcopidl/scanner.cc b/dcop/dcopidl/scanner.cc index cac884f71..02d33a764 100644 --- a/dcop/dcopidl/scanner.cc +++ b/dcop/dcopidl/scanner.cc @@ -1076,9 +1076,9 @@ YY_MALLOC_DECL YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; #line 148 "scanner.ll" @@ -1127,7 +1127,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; @@ -1762,9 +1762,9 @@ ECHO; static int yy_get_next_buffer() { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; + char *dest = yy_current_buffer->yy_ch_buf; + char *source = yytext_ptr; + int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) @@ -1894,8 +1894,8 @@ static int yy_get_next_buffer() static yy_state_type yy_get_previous_state() { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; yy_current_state = yy_start; yy_state_ptr = yy_state_buf; @@ -1903,7 +1903,7 @@ static yy_state_type yy_get_previous_state() for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; @@ -1931,9 +1931,9 @@ static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { - register int yy_is_jam; + int yy_is_jam; - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; @@ -1955,10 +1955,10 @@ static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; -register char *yy_bp; +char *yy_bp; #endif { - register char *yy_cp = yy_c_buf_p; + char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; @@ -1966,10 +1966,10 @@ register char *yy_bp; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ + int number_to_move = yy_n_chars + 2; + char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; - register char *source = + char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) @@ -2430,7 +2430,7 @@ yyconst char *s2; int n; #endif { - register int i; + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -2444,7 +2444,7 @@ static int yy_flex_strlen( s ) yyconst char *s; #endif { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; diff --git a/dcop/dcopidlng/kalyptus b/dcop/dcopidlng/kalyptus index e970812b2..22bfb6f53 100644 --- a/dcop/dcopidlng/kalyptus +++ b/dcop/dcopidlng/kalyptus @@ -439,7 +439,7 @@ LOOP: || $p =~ /^\s*KDOM_/ ); - push @includes_list, $1 if $p =~ /^#include\s+<?(.*?)>?\s*$/; + push @includes_list, $1 if $p =~ /^#include\s+[<"]?(.*?)[>"]?\s*$/; # remove all preprocessor macros if( $p =~ /^\s*#\s*(\w+)/ ) { @@ -1521,16 +1521,22 @@ sub makeParamList($$$) # Separate arg type from arg name, if the latter is specified if ( $arg =~ /(.*)\s+([\w_]+)\s*$/ || $arg =~ /(.*)\(\s*\*\s([\w_]+)\)\s*\((.*)\)\s*$/ ) { - if ( defined $3 ) { # function pointer - $argType = $1."(*)($3)"; - $argName = $2; + if ( $1 eq "const" || $2 eq "long" || $2 eq "short" || $2 eq "int" || $2 eq "char" ) { + # const qualifier or long notation of numeric type + # without argument name + $argType = "$1 $2"; } else { $argType = $1; $argName = $2; } - } else { # unnamed arg - or enum value + if ( defined $3 ) { + # function pointer + $argType .= "(*)($3)"; + } + } else { + # unnamed arg - or enum value $argType = $arg if (!$isEnum); - $argName = $arg if ($isEnum); + $argName = $arg if ($isEnum); } $argId++; diff --git a/dcop/dcopidlng/kalyptusCxxToDcopIDL.pm b/dcop/dcopidlng/kalyptusCxxToDcopIDL.pm index 8a2988f06..719f13e3b 100644 --- a/dcop/dcopidlng/kalyptusCxxToDcopIDL.pm +++ b/dcop/dcopidlng/kalyptusCxxToDcopIDL.pm @@ -95,7 +95,7 @@ sub preParseClass my( $classNode ) = @_; my $className = join( "::", kdocAstUtil::heritage($classNode) ); - if( $#{$classNode->{Kids}} < 0 || + if( ($#{$classNode->{Kids}} < 0 && !$classNode->{DcopExported}) || $classNode->{Access} eq "private" || $classNode->{Access} eq "protected" || # e.g. QPixmap::QPixmapData exists $classNode->{Tmpl} || @@ -161,18 +161,33 @@ sub generateMethod($$) $argType =~ s/^\s*(.*?)\s*$/$1/; $argType =~ s/</</g; $argType =~ s/>/>/g; - $argType =~ s/\s//g; - - $args .= " <ARG><TYPE$typeAttrs>$argType</TYPE><NAME>$arg->{ArgName}</NAME></ARG>\n"; + $argType =~ s/(\W)\s+/$1/g; + $argType =~ s/\s+(\W)/$1/g; + $argType =~ s/\b(signed|unsigned|long|short)$/$1 int/; + + $args .= " "; + $args .= "<ARG><TYPE$typeAttrs>$argType</TYPE>"; + $args .= "<NAME>$arg->{ArgName}</NAME>" if $arg->{ArgName} !~ /^$/; + $args .= "</ARG>\n"; } my $qual = ""; $qual .= " qual=\"const\"" if $flags =~ "c"; + my $r_isConst = ($returnType =~ s/^\s*const\s*//); + my $r_isRef = ($returnType =~ s/&//); + + my $retTypeAttrs = ""; + $retTypeAttrs .= " qleft=\"const\"" if $r_isConst; + $retTypeAttrs .= " qright=\"&\"" if $r_isRef; + $returnType = "void" unless $returnType; + $returnType =~ s/^\s*(.*?)\s*$/$1/; $returnType =~ s/</</g; $returnType =~ s/>/>/g; - $returnType =~ s/^\s*const\s*//; + $returnType =~ s/(\W)\s+/$1/g; + $returnType =~ s/\s+(\W)/$1/g; + $returnType =~ s/\b(signed|unsigned|long|short)$/$1 int/; my $methodCode = ""; @@ -182,7 +197,7 @@ sub generateMethod($$) if (!$isConstructor) { $methodCode .= " <$tagType$tagAttr$qual>\n"; - $methodCode .= " <TYPE>$returnType</TYPE>\n"; + $methodCode .= " <TYPE$retTypeAttrs>$returnType</TYPE>\n"; $methodCode .= " <NAME>$name</NAME>\n"; $methodCode .= "$args"; $methodCode .= " </$tagType>\n"; diff --git a/dcop/dcopidlng/kdocAstUtil.pm b/dcop/dcopidlng/kdocAstUtil.pm index f31f2b365..6abb59a25 100644 --- a/dcop/dcopidlng/kdocAstUtil.pm +++ b/dcop/dcopidlng/kdocAstUtil.pm @@ -152,10 +152,12 @@ ANITER: if( !defined $ref ) { # ancestor undefined - warn "warning: ", $node->{astNodeName}, - " inherits unknown class '", + if( $in->{astNodeName} ne "DCOPObject" + && $in->{astNodeName} ne "TQObject" ) { + warn "warning: ", $node->{astNodeName}, + " inherits unknown class '", $in->{astNodeName},"'\n"; - + } $parent->AddPropList( 'InBy', $node ); } else { diff --git a/dcop/dcopidlng/kdocParseDoc.pm b/dcop/dcopidlng/kdocParseDoc.pm index e5f19d50c..fa34f5f30 100644 --- a/dcop/dcopidlng/kdocParseDoc.pm +++ b/dcop/dcopidlng/kdocParseDoc.pm @@ -60,15 +60,15 @@ PARSELOOP: next if !defined $text; $text =~ s#^\s*\*(?!\/)##; + if ( $text =~ m#\*/# ) { + $finished = 1; + $text = $`; + } # if ( $text =~ /^\s*<\/pre>/i ) { # flushProp(); # $inbounded = 0; # } if( $inbounded ) { - if ( $text =~ m#\*/# ) { - $finished = 1; - $text = $`; - } $buffer .= $text; next PARSELOOP; } @@ -162,10 +162,6 @@ PARSELOOP: docProp( "LibDoc" ); } else { - if ( $text =~ m#\*/# ) { - $finished = 1; - $text = $`; - } $buffer .= $text; } } diff --git a/dcop/dcopserver.cpp b/dcop/dcopserver.cpp index c5bacc267..9a75a131e 100644 --- a/dcop/dcopserver.cpp +++ b/dcop/dcopserver.cpp @@ -118,7 +118,7 @@ static Bool HostBasedAuthProc ( char* /*hostname*/) extern "C" { extern IceWriteHandler _kde_IceWriteHandler; extern IceIOErrorHandler _kde_IceIOErrorHandler; -void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr); +void DCOPIceWriteChar(IceConn iceConn, unsigned long nbytes, char *ptr); } static TQCString readQCString(TQDataStream &ds) @@ -237,7 +237,7 @@ static unsigned long writeIceData(IceConn iceConn, unsigned long nbytes, char *p return 0; } -void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr) +void DCOPIceWriteChar(IceConn iceConn, unsigned long nbytes, char *ptr) { DCOPConnection* conn = the_server->findConn( iceConn ); #ifdef DCOP_DEBUG @@ -384,7 +384,7 @@ qWarning("[dcopserver] slotOutputRead() more data to send."); } } -static void DCOPIceSendData(register IceConn _iceConn, +static void DCOPIceSendData(IceConn _iceConn, const TQByteArray &_data) { if (_iceConn->outbufptr > _iceConn->outbuf) diff --git a/dcop/dcopserver_shutdown.c b/dcop/dcopserver_shutdown.c index fb25a86fa..af75c6d5a 100644 --- a/dcop/dcopserver_shutdown.c +++ b/dcop/dcopserver_shutdown.c @@ -151,7 +151,7 @@ static void cleanupDCOPsocket(char *buffer) if (socket_file) unlink(socket_file); - snprintf(cmd, BUFFER_SIZE, "iceauth remove netid='%s'", buffer); + snprintf(cmd, BUFFER_SIZE, ICEAUTH_COMMAND " remove netid='%s'", buffer); system(cmd); } diff --git a/dcop/tests/run-tests.sh b/dcop/tests/run-tests.sh index dc3640511..0d0b02aad 100644 --- a/dcop/tests/run-tests.sh +++ b/dcop/tests/run-tests.sh @@ -10,7 +10,9 @@ clean_up # create temporary home export HOME=$PWD/test-home mkdir $HOME +export ICEAUTHORITY=$HOME/.ICEauthority +echo '* Starting dcop server' ../dcopserver --nofork & DCOP_SERVER_PID=$! @@ -22,6 +24,10 @@ die() { } trap 'die "The script interrupted by user"' 2 15 +while ! ../dcopserver --serverid 2>/dev/null; do + echo '* Wait for the dcop server' + sleep 2 +done echo '* Running batch mode' ./dcop_test --batch >batch.stdout || die "Failed to run dcop_test" |