Commit 9b1fdd0a authored by Pekka Pessi's avatar Pekka Pessi

su_port.c: added #include <sofia-sip/su_string.h>

Making poll mechanism name matching case-insensitive.

darcs-hash:20090112142707-db55f-97d17e7fa8d5b7079ea9abf92bf6e300f14a77ea.gz
parent c2fb6d2d
......@@ -44,8 +44,8 @@
#define su_port_s su_virtual_port_s
#include "su_port.h"
#include <sofia-sip/su_string.h>
#include <string.h>
#include <stdlib.h>
/** Create the default su_port_t implementation. */
......@@ -115,25 +115,25 @@ void su_port_set_system_preferences(char const *name)
if (name == NULL)
;
#if HAVE_EPOLL
else if (strcmp(name, "epoll") == 0) {
else if (su_casematch(name, "epoll")) {
create = su_epoll_port_create;
start = su_epoll_clone_start;
}
#endif
#if HAVE_KQUEUE
else if (strcmp(name, "kqueue") == 0) {
else if (su_casematch(name, "kqueue")) {
create = su_kqueue_port_create;
start = su_kqueue_clone_start;
}
#endif
#if HAVE_SYS_DEVPOLL_H
else if (strcmp(name, "devpoll") == 0) {
else if (su_casematch(name, "devpoll")) {
create = su_devpoll_port_create;
start = su_devpoll_clone_start;
}
#endif
#if HAVE_POLL_PORT
else if (strcmp(name, "poll") == 0) {
else if (su_casematch(name, "poll")) {
create = su_poll_port_create;
start = su_poll_clone_start;
}
......@@ -144,7 +144,7 @@ void su_port_set_system_preferences(char const *name)
start = su_wsaevent_clone_start;
}
#elif HAVE_SELECT
else if (strcmp(name, "select") == 0) {
else if (su_casematch(name, "select")) {
create = su_select_port_create;
start = su_select_clone_start;
}
......
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