Doug Anson / SocketIO-k64f

Fork of SocketIO by Doug Anson

Revision:
4:ad06c58c7cf4
Parent:
3:529ce2bcfe77
Child:
5:912301390ce1
--- a/SocketIO.cpp	Mon Jul 08 02:50:57 2013 +0000
+++ b/SocketIO.cpp	Mon Jul 08 03:35:29 2013 +0000
@@ -118,7 +118,7 @@
     this->url_session = new char[256];
     
     // fill the buffer
-    sprintf(this->url_session,"ws://%s/%s/%s",this->url,this->ws_channel,this->session_key);
+    sprintf(this->url_session,"ws://%s/%s",this->url,this->session_key);
 }
 
 // attempt a connection via websockets
@@ -165,10 +165,10 @@
      
      // format:  Session_ID YY ZZ CHANNEL
      char t_sessionkey[128];
-     sscanf(response,"%s %d %d %s",t_sessionkey,&val1,&val2,channel);
+     sscanf(response,"%s %d %d %s",t_sessionkey,&val1,&val2,this->channel);
      
      // create
-     sprintf(sessionkey,"%s/%s",channel,t_sessionkey);            
+     sprintf(sessionkey,"%s/%s",this->channel,t_sessionkey);            
 }
 
 // acquire the session key for our session