Project

General

Profile

Actions

Bug #1040

closed

libevent upgrade from 1.3e to 1.4.5-stable

Added by tuxillo almost 16 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi

Here's a working patch for upgrading libevent. It compiles just fine and
I'm currently using in one of my DFBSD machines.

http://leaf.dragonflybsd.org/~tuxillo/patches/libevent145.diff

Bug fixes can be found in:

http://levent.svn.sourceforge.net/viewvc/levent/branches/patches-1.4/libevent/ChangeLog?revision=885&view=markup

I don't have the oportunity of checking with bluetooth because I don't
have any device, so if someone has devices and time, please check.

Joerg,
About ABI changes, there are some functions that have been removed, and
some parameters slightly changed:

evdns.h
-----------------------------
x Removed function -int evdns_resolv_conf_parse(int flags, const char *);
x Change in function
-int evdns_server_request_add_reply(struct evdns_server_request
*req, int section, const char *name, int type, int class, int ttl, int
datalen, int is_name, const char *data);
+int evdns_server_request_add_reply(struct evdns_server_request
*req, int section, const char *name, int type, int dns_class, int ttl,
int datalen, int is_name, const char *data);

event-internal.h
--------------------
x Deleted RB_HEAD(event_tree, event) timetree;

event.h
--------------------
x Deleted check and structure if not defined:
#ifndef RB_ENTRY
#define _EVENT_DEFINED_RBENTRY
#define RB_ENTRY(type)
\
struct {
\
struct type rbe_left; / left element /
\
struct type *rbe_right; /
right element /
\
struct type *rbe_parent; /
parent element /
\
int rbe_color; /
node color /
\
}
#endif /
!RB_ENTRY */

x In event structure deleted RB_ENTRY (event) ev_timeout_node;
x Deleted void *event_init(void); and replaced with struct event_base
*event_init(void);
x Replacement:
int bufferevent_write(struct bufferevent *bufev, void *data,
size_t size);
int bufferevent_write(struct bufferevent *bufev, const void
*data, size_t size);

x Parameter change:
void evtag_marshal(struct evbuffer *evbuf, uint8_t tag, const
void *data, uint32_t len);
void evtag_marshal(struct evbuffer *evbuf, ev_uint32_t tag,
const void *data, ev_uint32_t len);

void encode_int(struct evbuffer *evbuf, uint32_t number);
void encode_int(struct evbuffer *evbuf, ev_uint32_t number);
void evtag_marshal_int(struct evbuffer *evbuf, uint8_t tag, 
uint32_t integer);
void evtag_marshal_int(struct evbuffer *evbuf, ev_uint32_t tag,
ev_uint32_t integer);
void evtag_marshal_string(struct evbuffer *buf, uint8_t tag, 
const char *string);
void evtag_marshal_string(struct evbuffer *buf, ev_uint32_t
tag, const char *string);
void evtag_marshal_timeval(struct evbuffer *evbuf, uint8_t tag, 
struct timeval *tv);
void evtag_marshal_timeval(struct evbuffer *evbuf, ev_uint32_t
tag, struct timeval *tv);
int evtag_unmarshal(struct evbuffer *src, uint8_t *ptag, struct 
evbuffer *dst);
int evtag_unmarshal(struct evbuffer *src, ev_uint32_t *ptag,
struct evbuffer *dst);
int evtag_peek(struct evbuffer *evbuf, uint8_t *ptag);
int evtag_peek(struct evbuffer *evbuf, ev_uint32_t *ptag);
int evtag_peek_length(struct evbuffer *evbuf, uint32_t *plength);
int evtag_peek_length(struct evbuffer *evbuf, ev_uint32_t
*plength);

I'll be missing something, for sure, but basically this is what I have
been able to see.

Samuel Greear (sjg), I invite you to give your opinion here just like at
IRC ;-)

Actions

Also available in: Atom PDF