gsoap 副本上的 Sigsegv

发布于 2025-01-01 02:20:28 字数 1114 浏览 1 评论 0原文

我正在尝试构建一个 gsoap 服务。代码是:

ArchivatorCoreService server;
ArchivatorCoreService *tserver;
int port = 8080;
SOAP_SOCKET m, s;
m = server.bind(NULL, port, 100);
if (!soap_valid_socket(m))
{
      exit(1);
}
else
{
  qDebug() << "Info: Bind: Succesfully socket connection: " << m << ". Port " << port 
}
for (;;)
{
  qDebug() << "waiting...";
  s = server.accept();

  if (!soap_valid_socket(s))
  {
    if (server.errnum)
    {
       qDebug() << "1"; << "Error: Failed accept: " << messagec;
       exit(1);
  }
  else
  {
    qDebug() << "Info: Thread " << i << " accepts socket " << s << " connection from   IP " << ((server.ip >> 24)&0xFF) << "." << ((server.ip >> 16)&0xFF) << "." << ((server.ip >> 8)&0xFF) << "." << ((server.ip)&0xFF);

}
qDebug() << "2";
tserver = server.copy(); // make a safe copy
qDebug() << "3";

行内 tserver = server.copy();错误 sigsegv。

ArchivatorCoreService 肥皂剧;

非常感谢你

I'm tryning to build a service con gsoap. The code is:

ArchivatorCoreService server;
ArchivatorCoreService *tserver;
int port = 8080;
SOAP_SOCKET m, s;
m = server.bind(NULL, port, 100);
if (!soap_valid_socket(m))
{
      exit(1);
}
else
{
  qDebug() << "Info: Bind: Succesfully socket connection: " << m << ". Port " << port 
}
for (;;)
{
  qDebug() << "waiting...";
  s = server.accept();

  if (!soap_valid_socket(s))
  {
    if (server.errnum)
    {
       qDebug() << "1"; << "Error: Failed accept: " << messagec;
       exit(1);
  }
  else
  {
    qDebug() << "Info: Thread " << i << " accepts socket " << s << " connection from   IP " << ((server.ip >> 24)&0xFF) << "." << ((server.ip >> 16)&0xFF) << "." << ((server.ip >> 8)&0xFF) << "." << ((server.ip)&0xFF);

}
qDebug() << "2";
tserver = server.copy(); // make a safe copy
qDebug() << "3";

In line tserver = server.copy(); error sigsegv.

ArchivatorCoreService heracly of soap;

Thanks you very much

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鼻尖触碰 2025-01-08 02:20:28

你没有说你正在使用哪个版本的 gsoap ;然而,2.8.5 之前的版本存在内存泄漏问题,并且生成的 C++ 代码存在 SIGSEGV 问题。请参阅我之前的回答此处了解更多详细信息。

You don't say which version of gsoap you are using; however versions prior to 2.8.5 have an issue with memory leaks and SIGSEGVs with the C++ code that is generated. See my previous answer here for a few more details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文