Commits

Ivan Vučica committed 2585858

Several variables HAVE to be declared as pointers.

Comments (0)

Files changed (1)

libjingle-p2ponly.cpp

     
     printf(" ==> creating contentinfos to be able to initiate session\n");
     cricket::ContentInfos contentInfos; // this is a std::vector<cricket::ContentInfo>
-    cricket::ContentDescription contentDescription; // we should actually inherit from this class to describe the content
-    contentInfos.push_back(cricket::ContentInfo("CI_content_name", "CI_content_type", &contentDescription));
+    cricket::ContentDescription * contentDescription = new cricket::ContentDescription; // we should actually inherit from this class to describe the content
+    contentInfos.push_back(cricket::ContentInfo("CI_content_name", "CI_content_type", contentDescription));
 
     // TODO:
     // Creating a channel manually for some reason creates a transport
     //session->CreateChannel("TC_content_type", "TC_channel_name");
     
     printf(" ==> initiating our session\n");
-    cricket::SessionDescription sessionDescription(contentInfos);
-    session->Initiate("destination", &sessionDescription);
+    cricket::SessionDescription * sessionDescription = new cricket::SessionDescription(contentInfos);
+    session->Initiate("destination", sessionDescription);
 
     printf(" ==> simulating an acceptance message\n");
     cricket::SessionMessage m;
     m.type = cricket::ACTION_SESSION_ACCEPT;
     session->OnIncomingMessage(m);
 
+    delete session;
+    
     printf(" ==> NOT running an infinite loop\n");
     /*while(1)
     {