Changes in uspace/app/trace/ipcp.c [1569a9b:7354b5e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/ipcp.c
r1569a9b r7354b5e 35 35 #include <stdio.h> 36 36 #include <stdlib.h> 37 #include <str_error.h>38 37 #include <inttypes.h> 39 38 #include <adt/hash_table.h> … … 45 44 #include "ipcp.h" 46 45 46 #define IPCP_CALLID_SYNC 0 47 47 48 typedef struct { 48 49 sysarg_t phone_hash; … … 144 145 V_INTEGER, 145 146 V_INTEGER, 146 V_INTEGER 147 V_INTEGER 147 148 }; 148 149 … … 188 189 189 190 if ((display_mask & DM_IPC) != 0) { 190 printf("Call ID: % d, phone: %d, proto: %s, method: ",191 hash, phone,191 printf("Call ID: %p, phone: %d, proto: %s, method: ", 192 (void *) hash, phone, 192 193 (proto ? proto->name : "n/a")); 193 194 ipc_m_print(proto, IPC_GET_IMETHOD(*call)); … … 250 251 sysarg_t method; 251 252 sysarg_t service; 252 int retval;253 sysarg_t retval; 253 254 proto_t *proto; 254 255 int cphone; … … 265 266 266 267 if ((display_mask & DM_IPC) != 0) { 267 printf("Response to % d: retval=%s, args = (%" PRIun ", "268 printf("Response to %p: retval=%" PRIdn ", args = (%" PRIun ", " 268 269 "%" PRIun ", %" PRIun ", %" PRIun ", %" PRIun ")\n", 269 hash, str_error_name(retval), IPC_GET_ARG1(*answer),270 (void *) hash, retval, IPC_GET_ARG1(*answer), 270 271 IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer), 271 272 IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer)); … … 281 282 if (oper->rv_type != V_VOID) { 282 283 putchar(' '); 283 val_print( (sysarg_t)retval, oper->rv_type);284 val_print(retval, oper->rv_type); 284 285 } 285 286 … … 322 323 pending_call_t *pcall; 323 324 324 if (( call->flags & IPC_CALL_ANSWERED) == 0) {325 if ((hash & IPC_CALLID_ANSWERED) == 0 && hash != IPCP_CALLID_SYNC) { 325 326 /* Not a response */ 326 327 if ((display_mask & DM_IPC) != 0) { 327 printf("Not a response (hash % d)\n",hash);328 printf("Not a response (hash %p)\n", (void *) hash); 328 329 } 329 330 return; 330 331 } 332 333 hash = hash & ~IPC_CALLID_ANSWERED; 331 334 332 335 item = hash_table_find(&pending_calls, &hash); … … 345 348 } 346 349 350 void ipcp_call_sync(int phone, ipc_call_t *call, ipc_call_t *answer) 351 { 352 ipcp_call_out(phone, call, IPCP_CALLID_SYNC); 353 ipcp_call_in(answer, IPCP_CALLID_SYNC); 354 } 355 347 356 void ipcp_hangup(int phone, int rc) 348 357 { 349 358 if ((display_mask & DM_SYSTEM) != 0) { 350 printf("Hang phone %d up -> % s\n", phone, str_error_name(rc));359 printf("Hang phone %d up -> %d\n", phone, rc); 351 360 ipcp_connection_clear(phone); 352 361 }
Note:
See TracChangeset
for help on using the changeset viewer.