Subversion Repositories HelenOS

Rev

Rev 2878 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2878 Rev 2880
Line 76... Line 76...
76
    have_conn[phone] = 0;
76
    have_conn[phone] = 0;
77
    connections[phone].server = 0;
77
    connections[phone].server = 0;
78
    connections[phone].proto = NULL;
78
    connections[phone].proto = NULL;
79
}
79
}
80
 
80
 
81
static void ipc_m_print(ipcarg_t method)
81
static void ipc_m_print(proto_t *proto, ipcarg_t method)
82
{
82
{
83
    ipc_m_desc_t *desc;
83
    ipc_m_desc_t *desc;
-
 
84
    oper_t *oper;
84
 
85
 
85
    /* FIXME: too slow */
86
    /* FIXME: too slow */
86
    desc = ipc_methods;
87
    desc = ipc_methods;
87
    while (desc->number != 0) {
88
    while (desc->number != 0) {
88
        if (desc->number == method) {
89
        if (desc->number == method) {
Line 91... Line 92...
91
        }
92
        }
92
 
93
 
93
        ++desc;
94
        ++desc;
94
    }
95
    }
95
 
96
 
-
 
97
    if (proto != NULL) {
-
 
98
        oper = proto_get_oper(proto, method);
-
 
99
        if (oper != NULL) {
-
 
100
            printf("%s (%d)", oper->name, method);
-
 
101
            return;
-
 
102
        }
-
 
103
    }
-
 
104
 
96
    printf("%d", method);
105
    printf("%d", method);
97
}
106
}
98
 
107
 
99
void ipcp_init(void)
108
void ipcp_init(void)
100
{
109
{
Line 107... Line 116...
107
}
116
}
108
 
117
 
109
void ipcp_call_out(int phone, ipc_call_t *call, ipc_callid_t hash)
118
void ipcp_call_out(int phone, ipc_call_t *call, ipc_callid_t hash)
110
{
119
{
111
    pending_call_t *pcall;
120
    pending_call_t *pcall;
112
    char *proto_name;
121
    proto_t *proto;
113
 
122
 
114
    if (have_conn[phone]) proto_name = connections[phone].proto->name;
123
    if (have_conn[phone]) proto = connections[phone].proto;
115
    else proto_name = "n/a";
124
    else proto = NULL;
116
 
125
 
117
//  printf("ipcp_call_out()\n");
126
//  printf("ipcp_call_out()\n");
118
    printf("call id: 0x%x, phone: %d, proto: %s, method: ", hash, phone,
127
    printf("call id: 0x%x, phone: %d, proto: %s, method: ", hash, phone,
119
        proto_name);
128
        (proto ? proto->name : "n/a"));
120
    ipc_m_print(IPC_GET_METHOD(*call));
129
    ipc_m_print(proto, IPC_GET_METHOD(*call));
121
    printf(" args: (%u, %u, %u, %u, %u)\n",
130
    printf(" args: (%u, %u, %u, %u, %u)\n",
122
        IPC_GET_ARG1(*call),
131
        IPC_GET_ARG1(*call),
123
        IPC_GET_ARG2(*call),
132
        IPC_GET_ARG2(*call),
124
        IPC_GET_ARG3(*call),
133
        IPC_GET_ARG3(*call),
125
        IPC_GET_ARG4(*call),
134
        IPC_GET_ARG4(*call),