- Timestamp:
- 11/21/08 13:34:28 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/branches/trnewman/CR_shell/src/main_cognitive_radio.cpp
r66 r69 239 239 // Write message back to client 240 240 n = send(socketfd,message.c_str(),(message.size()+1),MSG_NOSIGNAL); 241 if (n<0) 242 error("Error sending to client\n"); 243 printf("sent: %s\n", message.c_str()); 241 244 242 245 return n; … … 249 252 250 253 251 while(1) {254 // while(1) { 252 255 // Send parameters from struct 253 256 sprintf(counter,"%d",ce_info->numUtilities); … … 256 259 // utilities 257 260 for(i = 0; i < ce_info->numUtilities; i++) { 261 //for(i = 0; i < 1; i++) { 258 262 SendMessage(socketfd,uList[i]->name); 259 263 SendMessage(socketfd,uList[i]->units); … … 263 267 } 264 268 265 / / parameters269 /*// parameters 266 270 sprintf(counter,"%i",ce_info->numParameters); 267 271 SendMessage(socketfd,counter); … … 296 300 SendMessage(socketfd,oList[i]->affection_list[j].relation); 297 301 } 298 } 302 }*/ 299 303 300 304 … … 316 320 }*/ 317 321 318 }322 // } 319 323 } 320 324 … … 384 388 cout << "Configuration file parsing completed." << endl; 385 389 386 pid = fork(); 390 print_current_config(uList, pList, oList, &ce_info); 391 392 pid = fork(); 387 393 if(pid == 0) { 388 394 // In child process - open policy engine port.