Added const to char* to allow initialisation from std::string in applications using the library

master
Paul Sutton 8 years ago
parent 54ffba6567
commit cea68bf2f2

@ -59,7 +59,7 @@ typedef struct SRSLTE_API {
}srslte_netsink_t;
SRSLTE_API int srslte_netsink_init(srslte_netsink_t *q,
char *address,
const char *address,
uint16_t port,
srslte_netsink_type_t type);

@ -60,7 +60,7 @@ typedef struct SRSLTE_API {
}srslte_netsource_t;
SRSLTE_API int srslte_netsource_init(srslte_netsource_t *q,
char *address,
const char *address,
uint16_t port,
srslte_netsource_type_t type);

@ -38,7 +38,7 @@
#include "srslte/io/netsink.h"
int srslte_netsink_init(srslte_netsink_t *q, char *address, uint16_t port, srslte_netsink_type_t type) {
int srslte_netsink_init(srslte_netsink_t *q, const char *address, uint16_t port, srslte_netsink_type_t type) {
bzero(q, sizeof(srslte_netsink_t));
q->sockfd=socket(AF_INET, type==SRSLTE_NETSINK_TCP?SOCK_STREAM:SOCK_DGRAM,0);

@ -36,7 +36,7 @@
#include "srslte/io/netsource.h"
int srslte_netsource_init(srslte_netsource_t *q, char *address, uint16_t port, srslte_netsource_type_t type) {
int srslte_netsource_init(srslte_netsource_t *q, const char *address, uint16_t port, srslte_netsource_type_t type) {
bzero(q, sizeof(srslte_netsource_t));
q->sockfd=socket(AF_INET,type==SRSLTE_NETSOURCE_TCP?SOCK_STREAM:SOCK_DGRAM,0);

Loading…
Cancel
Save