Changeset 572
- Timestamp:
- 05/03/08 15:44:43 (2 weeks ago)
- Files:
-
- nano-RK/projects/SAMPL/slip-clients/xmpp-client/globals.h (modified) (2 diffs)
- nano-RK/projects/SAMPL/slip-clients/xmpp-client/main.c (modified) (4 diffs)
- nano-RK/projects/SAMPL/slip-clients/xmpp-client/node_list.c (modified) (2 diffs)
- nano-RK/projects/SAMPL/slip-clients/xmpp-client/xmpp_pkt_writer.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nano-RK/projects/SAMPL/slip-clients/xmpp-client/globals.h
r500 r572 3 3 4 4 #include <stdint.h> 5 #include <lm-library.h> 5 6 6 7 uint8_t debug_txt_flag; … … 9 10 uint8_t print_input_flag; 10 11 12 XMPPConnection *connection; 13 11 14 #endif nano-RK/projects/SAMPL/slip-clients/xmpp-client/main.c
r566 r572 88 88 no_slip_flag=0; 89 89 print_input_flag=0; 90 connection=NULL; 90 91 91 92 if (argc < 3 || argc > 6) { … … 171 172 } 172 173 173 ret= start_xmpp_client(username,174 connection = start_xmpp_client(username, 174 175 password, 175 176 xmpp_server, … … 179 180 NULL); 180 181 181 if( ret != XMPP_NO_ERROR) {182 g_printerr("Could not start client. Error='%s'\n",ERROR_MESSAGE(ret));182 if(connection == NULL) { 183 g_printerr("Could not start client.\n"); 183 184 return -1; 184 185 } … … 205 206 { 206 207 // generate parent node for gateway 207 ret = create_event_node( name,NULL,FALSE);208 ret = create_event_node(connection, name,NULL,FALSE); 208 209 if(ret != XMPP_NO_ERROR) { 209 210 if(ret == XMPP_ERROR_NODE_EXISTS) nano-RK/projects/SAMPL/slip-clients/xmpp-client/node_list.c
r500 r572 54 54 node_list_add(node_name); 55 55 // generate parent node for gateway 56 ret = create_event_node( node_name,NULL,FALSE);56 ret = create_event_node(connection, node_name,NULL,FALSE); 57 57 if(ret != XMPP_NO_ERROR) { 58 58 if(ret == XMPP_ERROR_NODE_EXISTS) … … 74 74 strftime(timeStr,100,"%Y-%m-%d %X",localtime(×tamp)); 75 75 sprintf(buf,"<Node id=\"%s\" type=\"FIREFLY\" description=\"A Firefly Node\" timestamp=\"%s\"></Node>",node_name,timeStr); 76 if(xmpp_flag==1) ret = publish_to_node( node_name,buf);76 if(xmpp_flag==1) ret = publish_to_node(connection,node_name,buf); 77 77 78 78 } nano-RK/projects/SAMPL/slip-clients/xmpp-client/xmpp_pkt_writer.c
r566 r572 80 80 81 81 if(debug_txt_flag==1 ) printf( "Publish: %s\n",buf); 82 if(xmpp_flag==1 ) ret = publish_to_node( publisher_node_name,buf);82 if(xmpp_flag==1 ) ret = publish_to_node(connection, publisher_node_name,buf); 83 83 if(xmpp_flag && ret!=XMPP_NO_ERROR) printf( "XMPP Error: %s\n",ERROR_MESSAGE(ret)); 84 84 … … 122 122 123 123 if(debug_txt_flag==1) printf( "Publish: %s\n",buf); 124 if(xmpp_flag==1) ret = publish_to_node( node_name,buf);124 if(xmpp_flag==1) ret = publish_to_node(connection,node_name,buf); 125 125 if(xmpp_flag==1 && ret!=XMPP_NO_ERROR) printf( "XMPP Error: %s\n",ERROR_MESSAGE(ret)); 126 126 … … 173 173 { 174 174 if(debug_txt_flag==1 ) printf( "Publish: %s\n",buf); 175 if(xmpp_flag==1 ) ret = publish_to_node( node_name,buf);175 if(xmpp_flag==1 ) ret = publish_to_node(connection,node_name,buf); 176 176 if(xmpp_flag && ret!=XMPP_NO_ERROR) printf( "XMPP Error: %s\n",ERROR_MESSAGE(ret)); 177 177 if(debug_txt_flag==1) printf( "Publish done\n");
