Changes in uspace/app/trace/ipcp.c [79ae36dd:228e490] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/ipcp.c
r79ae36dd r228e490 37 37 #include <adt/hash_table.h> 38 38 #include <sys/typefmt.h> 39 #include <kernel/ipc/ipc_methods.h> 39 40 40 #include "ipc_desc.h" 41 41 #include "proto.h" … … 268 268 proto_t *proto; 269 269 int cphone; 270 270 271 271 sysarg_t *resp; 272 272 oper_t *oper; 273 273 int i; 274 274 275 // printf("parse_answer\n"); 276 275 277 phone = pcall->phone_hash; 276 278 method = IPC_GET_IMETHOD(pcall->question); 277 279 retval = IPC_GET_RETVAL(*answer); 278 280 279 281 resp = answer->args; 280 282 281 283 if ((display_mask & DM_IPC) != 0) { 282 284 printf("Response to %p: retval=%" PRIdn ", args = (%" PRIun ", " … … 286 288 IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer)); 287 289 } 288 290 289 291 if ((display_mask & DM_USER) != 0) { 290 292 oper = pcall->oper; 291 292 if ((oper != NULL) && 293 ((oper->rv_type != V_VOID) || (oper->respc > 0))) { 293 294 if (oper != NULL && (oper->rv_type != V_VOID || oper->respc > 0)) { 294 295 printf("->"); 295 296 296 297 if (oper->rv_type != V_VOID) { 297 298 putchar(' '); … … 303 304 putchar('('); 304 305 for (i = 1; i <= oper->respc; ++i) { 305 if (i > 1) 306 printf(", "); 306 if (i > 1) printf(", "); 307 307 val_print(resp[i], oper->resp_type[i - 1]); 308 308 } 309 309 putchar(')'); 310 310 } 311 311 312 312 putchar('\n'); 313 313 } 314 314 } 315 316 if ((phone == PHONE_NS) && (method == IPC_M_CONNECT_ME_TO) && 317 (retval == 0)) { 315 316 if (phone == 0 && method == IPC_M_CONNECT_ME_TO && retval == 0) { 318 317 /* Connected to a service (through NS) */ 319 318 service = IPC_GET_ARG1(pcall->question); 320 319 proto = proto_get_by_srv(service); 321 if (proto == NULL) 322 proto = proto_unknown; 323 320 if (proto == NULL) proto = proto_unknown; 321 324 322 cphone = IPC_GET_ARG5(*answer); 325 323 if ((display_mask & DM_SYSTEM) != 0) { 326 324 printf("Registering connection (phone %d, protocol: %s)\n", cphone, 327 proto->name); 328 } 329 325 proto->name); 326 } 330 327 ipcp_connection_set(cphone, 0, proto); 331 328 } … … 337 334 pending_call_t *pcall; 338 335 unsigned long key[1]; 339 336 337 // printf("ipcp_call_in()\n"); 338 340 339 if ((hash & IPC_CALLID_ANSWERED) == 0 && hash != IPCP_CALLID_SYNC) { 341 340 /* Not a response */ … … 345 344 return; 346 345 } 347 346 348 347 hash = hash & ~IPC_CALLID_ANSWERED; 349 348 key[0] = hash; 350 349 351 350 item = hash_table_find(&pending_calls, key); 352 if (item == NULL) 353 return; /* No matching question found */ 354 351 if (item == NULL) return; // No matching question found 352 355 353 /* 356 354 * Response matched to question. … … 359 357 pcall = hash_table_get_instance(item, pending_call_t, link); 360 358 hash_table_remove(&pending_calls, key, 1); 361 359 362 360 parse_answer(hash, pcall, call); 363 361 free(pcall);
Note:
See TracChangeset
for help on using the changeset viewer.