Commit 093dc2e6 authored by Pekka Pessi's avatar Pekka Pessi

su_port: moved su_port_prefer() interface to public include file. Fixed warnings.

darcs-hash:20070208171840-55b16-c0ca09c568b142a5c93c3715e8531cc6a6f31881.gz
parent 9591855e
......@@ -512,6 +512,30 @@ SOFIAPUBFUN void su_clone_wait(su_root_t *root, su_clone_r clone);
SOFIAPUBFUN int su_clone_pause(su_clone_r);
SOFIAPUBFUN int su_clone_resume(su_clone_r);
/* ---------------------------------------------------------------------- */
/* Different su_root_t implementations */
typedef su_port_t *su_port_create_f(void);
typedef int su_clone_start_f(su_root_t *parent,
su_clone_r return_clone,
su_root_magic_t *magic,
su_root_init_f init,
su_root_deinit_f deinit);
SOFIAPUBFUN void su_port_prefer(su_port_create_f *f, su_clone_start_f *);
SOFIAPUBFUN su_port_t *su_epoll_port_create(void)
__attribute__((__malloc__));
SOFIAPUBFUN su_port_t *su_poll_port_create(void)
__attribute__((__malloc__));
SOFIAPUBFUN su_port_t *su_select_port_create(void)
__attribute__((__malloc__));
SOFIAPUBFUN su_clone_start_f su_epoll_clone_start;
SOFIAPUBFUN su_clone_start_f su_poll_clone_start;
SOFIAPUBFUN su_clone_start_f su_select_clone_start;
SOFIA_END_DECLS
#endif /* SU_WAIT_H */
......@@ -152,26 +152,6 @@ SOFIAPUBFUN su_port_t *su_port_create(void)
/* Extension from >= 1.12.5 */
typedef su_port_t *su_port_create_f(void);
typedef int su_clone_start_f(su_root_t *parent,
su_clone_r return_clone,
su_root_magic_t *magic,
su_root_init_f init,
su_root_deinit_f deinit);
SOFIAPUBFUN void su_port_prefer(su_port_create_f *f, su_clone_start_f *);
SOFIAPUBFUN su_port_t *su_epoll_port_create(void)
__attribute__((__malloc__));
SOFIAPUBFUN su_port_t *su_poll_port_create(void)
__attribute__((__malloc__));
SOFIAPUBFUN su_port_t *su_select_port_create(void)
__attribute__((__malloc__));
SOFIAPUBFUN su_clone_start_f su_epoll_clone_start;
SOFIAPUBFUN su_clone_start_f su_poll_clone_start;
SOFIAPUBFUN su_clone_start_f su_select_clone_start;
SOFIAPUBFUN void su_msg_delivery_report(su_msg_r msg);
SOFIAPUBFUN su_duration_t su_timer_next_expires(su_timer_t const * t,
su_time_t now);
......
......@@ -149,13 +149,11 @@ int su_socket_port_init(su_port_t *self, su_port_vtable_t const *vtable)
goto error;
}
retval = 0;
return 0;
if (retval) {
error:
su_log("%s: %s: %s\n", "su_socket_port_init",
why, su_strerror(su_errno()));
}
return retval;
}
......
......@@ -52,8 +52,6 @@ typedef struct test_ep_s test_ep_t;
#define SU_ROOT_MAGIC_T root_test_t
#define SU_WAKEUP_ARG_T test_ep_t
#include "su_port.h"
#include <sofia-sip/su_wait.h>
#include <sofia-sip/su_alloc.h>
#include <sofia-sip/su_log.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment