Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 768030
Collapse All | Expand All

(-)a/upnpevents.c (-6 / +5 lines)
Lines 290-307 upnp_event_create_notify(struct subscriber *sub) Link Here
290
	addr.sin_family = AF_INET;
290
	addr.sin_family = AF_INET;
291
	inet_aton(obj->addrstr, &addr.sin_addr);
291
	inet_aton(obj->addrstr, &addr.sin_addr);
292
	addr.sin_port = htons(port);
292
	addr.sin_port = htons(port);
293
	DPRINTF(E_DEBUG, L_HTTP, "%s: '%s' %hu '%s'\n", "upnp_event_notify_connect",
293
	DPRINTF(E_DEBUG, L_HTTP, "%s: '%s' %hu '%s'\n", "upnp_event_create_notify",
294
	       obj->addrstr, port, obj->path);
294
	       obj->addrstr, port, obj->path);
295
	obj->state = EConnecting;
295
	obj->state = EConnecting;
296
	obj->ev = (struct event ){ .fd = s, .rdwr = EVENT_WRITE,
297
		.process = upnp_event_process_notify, .data = obj };
298
	event_module.add(&obj->ev);
296
	if(connect(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
299
	if(connect(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
297
		if(errno != EINPROGRESS && errno != EWOULDBLOCK) {
300
		if(errno != EINPROGRESS && errno != EWOULDBLOCK) {
298
			DPRINTF(E_ERROR, L_HTTP, "%s: connect(): %s\n", "upnp_event_notify_connect", strerror(errno));
301
			DPRINTF(E_ERROR, L_HTTP, "%s: connect(): %s\n", "upnp_event_create_notify", strerror(errno));
299
			obj->state = EError;
302
			obj->state = EError;
300
		}
303
		}
301
	} else {
302
		obj->ev = (struct event ){ .fd = s, .rdwr = EVENT_WRITE,
303
		    .process = upnp_event_process_notify, .data = obj };
304
		event_module.add(&obj->ev);
305
	}
304
	}
306
305
307
	return;
306
	return;

Return to bug 768030