KSambaPlugin question
Joe Kraft
hishadow at netcabo.pt
Sat Mar 13 02:31:47 PST 2004
I've been looking at the KSambaPlugin and am interested in it. I noticed
there used to be a port for this KControl plugin, but it appears to not
have been updated and was removed. I figured it's as good of a place as
any to start digging into FreeBSD, but I've run into a problem with it.
I've made the changes to the port files and it configures and builds fine,
but it won't run. I'm new with programming on FreeBSD, so forgive me if
this is an easy problem to solve...
I'm using KDE 3.2, Samba 3.0.1, FreeBSD 5.2, and ksambaplugin 0.5.
kde-3.2.0 The "meta-port" for KDE
kdebase-3.2.0_1 Basic applications for the KDE system
kdelibs-3.2.0 Base set of libraries needed by KDE programs
samba-3.0.1_2,1 A free SMB and CIFS client and server for UNIX
samba-libsmbclient-3.0.1 The shared lib from the samba packages
The compile is relatively clean, only a few messages about unused variables
and arguments and a couple about using some print headers which are
supposed to be for internal KDE use. No errors though.
What is happening is that the plugin is freezing when it's called. I've
tracked it down to the external process call (testParam.start), which never
returns. Here's the relevant code parts:
--- start code ---
KProcess testParam;
testParam << "testparm";
testParam << "-V";
_parmOutput = QString("");
_sambaVersion = 2;
connect( &testParam, SIGNAL(receivedStdout(KProcess*,char*,int)),
this, SLOT(testParmStdOutReceived(KProcess*,char*,int)));
=>if (testParam.start(KProcess::Block,KProcess::Stdout)) {
if (_parmOutput.find("3") > -1)
_sambaVersion = 3;
}
--- end code ---
--- more code ---
void SambaFile::testParmStdOutReceived(KProcess *, char *buffer, int
buflen)
{
_parmOutput+=QString::fromLatin1(buffer,buflen);
}
--- end more code ---
I can run the 'testparm -V' from a shell to get the samba version, but the
response seems to get lost here. Is there anything that should be
different in this snippet of code? It appears the plugin has only been
tested in Linux; so, is there a common problem I'm running into here.
Pointers to any additional documentation I should read would be
appreciated.
Thanks,
Joe.
More information about the freebsd-questions
mailing list