Commit fd0a2df6 authored by Simon Morlat's avatar Simon Morlat
Browse files

bugfixing on unix after windows merge.

parent ca677643
......@@ -19,7 +19,6 @@
#include "belle-sip/belle-sip.h"
#include "belle_sip_internal.h"
#include <malloc.h>
#ifndef WIN32
#include <unistd.h>
......@@ -69,11 +68,14 @@ static void belle_sip_source_to_poll(belle_sip_source_t *s, belle_sip_pollfd_t *
}
static unsigned int belle_sip_source_get_revents(belle_sip_source_t *s,belle_sip_pollfd_t *pfd){
return belle_sip_poll_to_event(pfd[s->index]);
return belle_sip_poll_to_event(&pfd[s->index]);
}
#else
#include <malloc.h>
typedef HANDLE belle_sip_pollfd_t;
static void belle_sip_source_to_poll(belle_sip_source_t *s, belle_sip_pollfd_t *pfd,int i){
......
......@@ -98,6 +98,13 @@ const char *belle_sip_get_socket_error_string_from_code(int code){
#else
int belle_sip_init_sockets(){
return 0;
}
void belle_sip_uninit_sockets(){
}
int belle_sip_socket_set_nonblocking(belle_sip_socket_t sock){
return fcntl (sock, F_SETFL, fcntl(sock,F_GETFL) | O_NONBLOCK);
}
......
......@@ -46,6 +46,8 @@
* Socket abstraction layer
*/
int belle_sip_init_sockets(void);
void belle_sip_uninit_sockets(void);
int belle_sip_socket_set_nonblocking (belle_sip_socket_t sock);
#if defined(WIN32)
......@@ -75,8 +77,6 @@ static inline int inet_aton(const char *ip, struct in_addr *p){
#else
#define belle_sip_init_sockets() 0
#define belle_sip_uninit_sockets()
static inline void close_socket(belle_sip_socket_t s){
close(s);
}
......
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