Make notify_send_and_recv() return the appropriate error code.
notify_send_and_recv() was returning the connection fd.
This commit is contained in:
parent
8bd32d330b
commit
a5fb5edfc9
@ -195,8 +195,7 @@ static UPNP_INLINE int notify_send_and_recv(
|
|||||||
conn_fd = http_Connect(destination_url, &url);
|
conn_fd = http_Connect(destination_url, &url);
|
||||||
if (conn_fd < 0) {
|
if (conn_fd < 0) {
|
||||||
/* return UPNP error */
|
/* return UPNP error */
|
||||||
|
return UPNP_E_SOCKET_CONNECT;
|
||||||
return conn_fd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret_code = sock_init(&info, conn_fd);
|
ret_code = sock_init(&info, conn_fd);
|
||||||
@ -293,11 +292,9 @@ static int genaNotify(
|
|||||||
// send a notify to each url until one goes thru
|
// send a notify to each url until one goes thru
|
||||||
for( i = 0; i < sub->DeliveryURLs.size; i++ ) {
|
for( i = 0; i < sub->DeliveryURLs.size; i++ ) {
|
||||||
url = &sub->DeliveryURLs.parsedURLs[i];
|
url = &sub->DeliveryURLs.parsedURLs[i];
|
||||||
|
return_code = notify_send_and_recv(
|
||||||
if( ( return_code = notify_send_and_recv( url,
|
url, &mid_msg, propertySet,&response);
|
||||||
&mid_msg, propertySet,
|
if (return_code == UPNP_E_SUCCESS) {
|
||||||
&response ) ) ==
|
|
||||||
UPNP_E_SUCCESS ) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user