dcop/iceauth msvc fix
Michael Drüing
michael at drueing.de
Thu Feb 23 00:22:30 CET 2006
Hi,
OK, now that I have DCOPserver up and running, I fixed a small TODO in
dcopserver_shutdown, which prevented it from running.
Here's the patch:
Index: dcopserver_shutdown.c
===================================================================
--- dcopserver_shutdown.c (revision 512583)
+++ dcopserver_shutdown.c (working copy)
@@ -90,8 +90,11 @@
int n;
n = max_length;
- /* TODO: (rh) add win32 home dir */
+#ifdef _WIN32
+ home_dir = getenv("USERPROFILE");
+#else
home_dir = getenv("HOME");
+#endif
strncpy(dcop_file, home_dir, n);
dcop_file[ n - 1 ] = '\0';
n -= strlen(home_dir);
I suppose this is for W2k/NT only, I don't know (and, honestly, I don't
really care ;-) if Win9x also has that variable defined.....
--Michael
> -----Original Message-----
> From: Peter Kümmel [mailto:syntheticpp at gmx.net]
> Sent: Thursday, February 23, 2006 12:02 AM
> To: kde-buildsystem at kde.org
> Cc: Michael Drüing
> Subject: Re: dcop/iceauth msvc fix
>
> Michael Drüing wrote:
> > Hi,
> >
> >> Your patch works fine. :)
> >
> > glad to hear that :)
> >
> >> And when commenting out the mentioned line in dcopserver.cpp
> >> (which is only a hack) it could connect to the server when
> >> creating a KApplication.
> >
> > which line do you mean, exactly? I tried commenting out
> various lines which
>
> Hi Michael,
>
> here by "brute force" solution:
>
>
> $ svn diff dcop/dcopserver.cpp
> Index: dcop/dcopserver.cpp
> ===================================================================
> --- dcop/dcopserver.cpp (Revision 512547)
> +++ dcop/dcopserver.cpp (Arbeitskopie)
> @@ -1074,8 +1074,8 @@
> connect( con, SIGNAL( activated(int) ), this, SLOT(
> newClient(int) ) );
> }
> char c = 0;
> - write(ready[1], &c, 1); // dcopserver is started
> - close(ready[1]);
> + //write(ready[1], &c, 1); // dcopserver is started
> + //close(ready[1]);
>
> m_timer = new QTimer(this);
> connect( m_timer, SIGNAL(timeout()), this,
> SLOT(slotTerminate()) );
>
> cuser at cname /cygdrive/c/sandbox/kdelibs/kdelibs
>
>
>
> > all had to do with the ready[] pipe, especially I tried
> closing them only
> > once, or not closing them at all, which all didn't work as
> expected. I must
> > admit that I didn't fully understand DCOPserver (I'm rather
> new to KDE
> > programming, at least at this low level)
> >
>
>
More information about the Kde-buildsystem
mailing list