View | Details | Raw Unified | Return to bug 11648
Collapse All | Expand All

(-)kdebluetooth-1.0/kdebluetooth/kbluetoothd/kbluetoothd/application.cpp~ (+21 lines)
Lines 36-41 KBluetoothdApp::KBluetoothdApp() : Link Here
36
    // Enable autostart
36
    // Enable autostart
37
    m_config->setGroup("General");
37
    m_config->setGroup("General");
38
    m_config->writeEntry("AutoStart", true);
38
    m_config->writeEntry("AutoStart", true);
39
    {
40
	int pagent_pid = m_config->readNumEntry("PassKeyAgentPid", 0);
41
	if( pagent_pid >= 0 )
42
	{
43
	    if( pagent_pid == 0 || (pagent_pid > 0 && ::kill(pagent_pid, 0) < 0) )
44
	    {
45
		pid_t new_pid = 0;
46
		m_config->writeEntry("PassKeyAgentPid", new_pid);
47
		if(::access("/usr/bin/passkey-agent", X_OK) == 0)
48
		{
49
		    new_pid = fork();
50
		    if( new_pid == 0 )
51
		    {
52
			::execl("/usr/bin/passkey-agent", "/usr/bin/passkey-agent", "--default", "/usr/sbin/kbluepin", NULL);
53
		    }
54
		}
55
		if( new_pid > 0 )
56
		    m_config->writeEntry("PassKeyAgentPid", new_pid);
57
	    }
58
	}
59
    }
39
    m_config->sync();
60
    m_config->sync();
40
61
41
    metaServer = NULL;
62
    metaServer = NULL;

Return to bug 11648