edu.mvk
25th October 2006, 16:08
Hi,
I have a qtapplication which creates QCopChannels and connects a slot to the recieved signal.
If i run this for the first time, all the QCopChannels are created properly and the slot is getting called when ever a msg is put on that channel. But if i kill the application using SIGKILL and restart, it is failed to register the QCopChannel with the server....
i did following things after restart....
class_obj( const QCString& p_channel ) : m_channel(p_channel, this)
{
printf("\n The QCopChannel is \"%s\" \n",m_channel.channel(),p_topic_pt);
if(QCopChannel::isRegistered(p_channel))
printf("\n This \"%s\" Channel is registered\n",p_channel,p_topic_pt);
else
printf("\n This \"%s\" Channel is not registered\n",p_channel,p_topic_pt);
if(connect(&m_channel,
SIGNAL(received (const QCString&, const QByteArray&)),
this,
SLOT(mapQcopMessToESEvent(const QCString&, const QByteArray& ))) == true)
printf("\n The connect is successful for \"%s\"......",(const char*)p_channel, p_topic_pt);
else
printf("\n The connect is failed for \"%s\".......",(const char*)p_channel, p_topic_pt);
}
the above is a constructor of the class "class_obj".
-> By using the "m_channel.channel()" i'm able to print the channel name that means i assume that the channel with that name is getting created. but there is some problem while registering it with the qt-server.
-> When the control reaches the "isregistered(p_channel)" function it is getting hanged i.e the control is not coming out of the isregistered function.
I couldnt understand whats the problem..... Please help me in resolving it...
Thanks.
I have a qtapplication which creates QCopChannels and connects a slot to the recieved signal.
If i run this for the first time, all the QCopChannels are created properly and the slot is getting called when ever a msg is put on that channel. But if i kill the application using SIGKILL and restart, it is failed to register the QCopChannel with the server....
i did following things after restart....
class_obj( const QCString& p_channel ) : m_channel(p_channel, this)
{
printf("\n The QCopChannel is \"%s\" \n",m_channel.channel(),p_topic_pt);
if(QCopChannel::isRegistered(p_channel))
printf("\n This \"%s\" Channel is registered\n",p_channel,p_topic_pt);
else
printf("\n This \"%s\" Channel is not registered\n",p_channel,p_topic_pt);
if(connect(&m_channel,
SIGNAL(received (const QCString&, const QByteArray&)),
this,
SLOT(mapQcopMessToESEvent(const QCString&, const QByteArray& ))) == true)
printf("\n The connect is successful for \"%s\"......",(const char*)p_channel, p_topic_pt);
else
printf("\n The connect is failed for \"%s\".......",(const char*)p_channel, p_topic_pt);
}
the above is a constructor of the class "class_obj".
-> By using the "m_channel.channel()" i'm able to print the channel name that means i assume that the channel with that name is getting created. but there is some problem while registering it with the qt-server.
-> When the control reaches the "isregistered(p_channel)" function it is getting hanged i.e the control is not coming out of the isregistered function.
I couldnt understand whats the problem..... Please help me in resolving it...
Thanks.