Changeset a1a101d in mainline for uspace/srv/net/inetsrv/inet_link.c
- Timestamp:
- 2012-08-17T16:58:51Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bc0ccab
- Parents:
- 920d0fc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inetsrv/inet_link.c
r920d0fc ra1a101d 64 64 int rc; 65 65 66 log_msg(L VL_DEBUG, "inet_iplink_recv()");66 log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_iplink_recv()"); 67 67 rc = inet_pdu_decode(sdu->data, sdu->size, &packet); 68 68 if (rc != EOK) { 69 log_msg(L VL_DEBUG, "failed decoding PDU");69 log_msg(LOG_DEFAULT, LVL_DEBUG, "failed decoding PDU"); 70 70 return rc; 71 71 } 72 72 73 log_msg(L VL_DEBUG, "call inet_recv_packet()");73 log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet()"); 74 74 rc = inet_recv_packet(&packet); 75 log_msg(L VL_DEBUG, "call inet_recv_packet -> %d", rc);75 log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet -> %d", rc); 76 76 free(packet.data); 77 77 … … 91 91 rc = loc_category_get_id("iplink", &iplink_cat, IPC_FLAG_BLOCKING); 92 92 if (rc != EOK) { 93 log_msg(L VL_ERROR, "Failed resolving category 'iplink'.");93 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed resolving category 'iplink'."); 94 94 fibril_mutex_unlock(&inet_discovery_lock); 95 95 return ENOENT; … … 98 98 rc = loc_category_get_svcs(iplink_cat, &svcs, &count); 99 99 if (rc != EOK) { 100 log_msg(L VL_ERROR, "Failed getting list of IP links.");100 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting list of IP links."); 101 101 fibril_mutex_unlock(&inet_discovery_lock); 102 102 return EIO; … … 116 116 117 117 if (!already_known) { 118 log_msg(L VL_DEBUG, "Found IP link '%lu'",118 log_msg(LOG_DEFAULT, LVL_DEBUG, "Found IP link '%lu'", 119 119 (unsigned long) svcs[i]); 120 120 rc = inet_link_open(svcs[i]); 121 121 if (rc != EOK) 122 log_msg(L VL_ERROR, "Could not open IP link.");122 log_msg(LOG_DEFAULT, LVL_ERROR, "Could not open IP link."); 123 123 } 124 124 } … … 133 133 134 134 if (ilink == NULL) { 135 log_msg(L VL_ERROR, "Failed allocating link structure. "135 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating link structure. " 136 136 "Out of memory."); 137 137 return NULL; … … 156 156 int rc; 157 157 158 log_msg(L VL_DEBUG, "inet_link_open()");158 log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_link_open()"); 159 159 ilink = inet_link_new(); 160 160 if (ilink == NULL) … … 166 166 rc = loc_service_get_name(sid, &ilink->svc_name); 167 167 if (rc != EOK) { 168 log_msg(L VL_ERROR, "Failed getting service name.");168 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting service name."); 169 169 goto error; 170 170 } … … 172 172 ilink->sess = loc_service_connect(EXCHANGE_SERIALIZE, sid, 0); 173 173 if (ilink->sess == NULL) { 174 log_msg(L VL_ERROR, "Failed connecting '%s'", ilink->svc_name);174 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed connecting '%s'", ilink->svc_name); 175 175 goto error; 176 176 } … … 178 178 rc = iplink_open(ilink->sess, &inet_iplink_ev_ops, &ilink->iplink); 179 179 if (rc != EOK) { 180 log_msg(L VL_ERROR, "Failed opening IP link '%s'",180 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed opening IP link '%s'", 181 181 ilink->svc_name); 182 182 goto error; … … 185 185 rc = iplink_get_mtu(ilink->iplink, &ilink->def_mtu); 186 186 if (rc != EOK) { 187 log_msg(L VL_ERROR, "Failed determinning MTU of link '%s'",187 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed determinning MTU of link '%s'", 188 188 ilink->svc_name); 189 189 goto error; 190 190 } 191 191 192 log_msg(L VL_DEBUG, "Opened IP link '%s'", ilink->svc_name);192 log_msg(LOG_DEFAULT, LVL_DEBUG, "Opened IP link '%s'", ilink->svc_name); 193 193 list_append(&ilink->link_list, &inet_link_list); 194 194 … … 209 209 rc = inet_addrobj_add(addr); 210 210 if (rc != EOK) { 211 log_msg(L VL_ERROR, "Failed setting IP address on internet link.");211 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed setting IP address on internet link."); 212 212 inet_addrobj_delete(addr); 213 213 /* XXX Roll back */ … … 218 218 rc = iplink_addr_add(ilink->iplink, &iaddr); 219 219 if (rc != EOK) { 220 log_msg(L VL_ERROR, "Failed setting IP address on internet link.");220 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed setting IP address on internet link."); 221 221 inet_addrobj_remove(addr); 222 222 inet_addrobj_delete(addr); … … 245 245 rc = loc_register_cat_change_cb(inet_link_cat_change_cb); 246 246 if (rc != EOK) { 247 log_msg(L VL_ERROR, "Failed registering callback for IP link "247 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback for IP link " 248 248 "discovery (%d).", rc); 249 249 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.